EventLimiter

2.0.0

💎 Simple classes for efficiently handling events based on a Swift Concurrency.
baekteun/EventLimiter

What's New

2.0.0

2023-06-23T01:40:35Z

Changed

  • Debouncer, Throttler를 실행할 때 async throws closure가 아닌 async closrue를 보내도록 변경합니다

Full Changelog: 1.0.5...2.0.0

EventLimiter

Simple classes for efficiently handling events.

Document


Contents

Requirements

  • iOS 13.0+
  • tvOS 13.0+
  • macOS 10.15+
  • watchOS 6.0+
  • Swift 5.0+

Overview

Simple classes for efficiently handling events. You can use the Debouncer and Throttler to handle events.

Installation

Swift Package Manager

Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To integrate EventLimiter into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/baekteun/EventLimiter.git", .upToNextMajor(from: "1.0.0"))
]

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate CombineFlow into your project manually.


Usage

QuickStart

let debouncer = Debouncer(for: 0.3)
debouncer {
    await self.search(keyword: keyword)
}
debouncer.cancel()
let throttler = Throttler(for: 1, latest: false)
throttler {
    await self.reachedBottom()
}
throttler.cancel()

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Oct 27 2025 08:55:40 GMT-0900 (Hawaii-Aleutian Daylight Time)