Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Latest commit

 

History

History
33 lines (21 loc) · 569 Bytes

File metadata and controls

33 lines (21 loc) · 569 Bytes

throttled

Throttled scroll and resize event via requestAnimationFrame.

Based on this article

Installation

Install with component(1):

$ component install pilotcreative/throttled

Usage

var throttled = require('throttled');

throttled.on('scroll', function(){
  console.log('clean scroll');
});

throttled.on('resize', function(){
  console.log('clean resize');
});

throttled.on('wheel', function(){
  console.log('clean wheel');
});

License

MIT