raf-throttle-edge

1.0.2 • Public • Published

raf-throttle (with edge selection option)

Use throttle with requestAnimationFrame with the options of frame selection (either leading edge or trailing edge.)

Lets you create a throttled function, which only invokes the passed function at most once per animation frame on a browser or per 1000/60 ms on Node. Additionally, the arguments to the function call can be controlled (Leading or Trailing by passing as argument to the throttle function along with the callback function)

Demo Work in progress.

Usage

Contributing

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ npm test).

Package Sidebar

Install

npm i raf-throttle-edge

Weekly Downloads

4

Version

1.0.2

License

none

Last publish

Collaborators

  • abhilashsrivastava17