Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 810 Bytes

README.MD

File metadata and controls

15 lines (9 loc) · 810 Bytes

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).