1.0.2 • Published 8 years ago

raf-listen v1.0.2

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

raf listen

js-standard-style

Call a function at most once per animation frame.

Featuring:

  • commonjs
  • no es6

install

$ npm install raf-listen

example

var throttle = require('raf-listen')
// polyfill raf if you want
require('raf').polyfill()

setInterval(function () {
  console.log('unthrottled')
}, 5)

setInterval(throttle(function () {
  console.log('throttled')
}), 5)
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago