Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/frame-debounce
https://github.com/hughsk/frame-debounce
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hughsk/frame-debounce
- Owner: hughsk
- License: other
- Created: 2014-05-19T00:57:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-03T07:23:14.000Z (almost 10 years ago)
- Last Synced: 2024-10-17T16:41:02.129Z (22 days ago)
- Language: JavaScript
- Size: 108 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# frame-debounce [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)
Decorate a function so that it only fires once per frame, using
`requestAnimationFrame` in the browser and `setImmediate` or `process.nextTick`
in node.## Usage
[![NPM](https://nodei.co/npm/frame-debounce.png)](https://nodei.co/npm/frame-debounce/)
### debounced = debounce(fn, [immediate])
Returns a decorated version of `fn`, that can only be called once per frame
## See Also
* [debounce](http://github.com/component/debounce)
* [frame-queue](https://github.com/hughsk/frame-queue)## License
MIT. See [LICENSE.md](http://github.com/hughsk/frame-debounce/blob/master/LICENSE.md) for details.