8000 GitHub - danydev/DORateLimit: Rate limit your code execution
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

danydev/DORateLimit

Repository files navigation

DORateLimit

CI Status Version License Platform

DORateLimit allows you to rate limit your function calls both by using throttling and debouncing. A good explanation about the differences between debouncing and throttling can be found here.

Usage

RateLimit.throttle("throttleFunctionKey", threshold: 1.0) {
    print("triggering throttled closure")
}
    
RateLimit.debounce("debounceFunctionKey", threshold: 1.0) {
    print("triggering debounced closure")
}

Installation

RateLimit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DORateLimit"

License

RateLimit is available under the MIT license. See the LICENSE file for more info.

About

Rate limit your code execution

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0