frame-debounce

Decorate a function so that it only fires once per frame, using `requestAnimationFrame` in the browser and `setImmediate` or `process.nextTick` in node.

OTHER License

Downloads
47
Stars
15
Committers
1

frame-debounce stable

Decorate a function so that it only fires once per frame, using requestAnimationFrame in the browser and setImmediate or process.nextTick in node.

Usage

debounced = debounce(fn, [immediate])

Returns a decorated version of fn, that can only be called once per frame

See Also

License

MIT. See LICENSE.md for details.

Package Rankings
Top 7.95% on Npmjs.org
Badges
Extracted from project README
stable