Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

raf-listen

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raf-listen

Call a function at most once per animation frame

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
-40%
Maintainers
1
Weekly downloads
 
Created
Source

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)

Keywords

raf

FAQs

Package last updated on 17 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts