https://github.com/nx-js/limiters
Rate limiters for the NX compiler utility.
https://github.com/nx-js/limiters
Last synced: 10 months ago
JSON representation
Rate limiters for the NX compiler utility.
- Host: GitHub
- URL: https://github.com/nx-js/limiters
- Owner: nx-js
- License: mit
- Created: 2016-12-31T13:28:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-09T08:54:00.000Z (almost 9 years ago)
- Last Synced: 2025-02-04T19:17:55.173Z (11 months ago)
- Language: JavaScript
- Homepage: http://www.nx-framework.com/
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Limiters
This repository contains a collection of rate limiters for the
[compiler utility](https://github.com/nx-js/compiler-util). It creates an registers the
following limiters.
- if: Has one parameter. If the parameter is falsy, the event handler won't be called.
- delay: Has a number parameter and delays the event handler by that many milliseconds. The delay is 200 milliseconds by default.
- debounce: Has a number parameter and causes the event handler to only execute, if the event doesn't happen for at least that many milliseconds. The parameter is 200 milliseconds by default.
- throttle: Has a number parameter and causes the event handler to execute only if it didn't execute in the last interval. The parameter is 200 - milliseconds by default.
- key: Only handles the event if it matches with one of the keys provided as arguments. If the event is not a keyboard event, this limiter has no effect. For the name of special keys see [this page](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).
You can learn more
about NX rate limiters [here](http://nx-framework.com/docs/middlewares/interpolate).