t-throttle

Tiny throttle

Downloads
8
Stars
3
Committers
2

t-throttle

The tiny throttle function.

Installation

$ npm install t-throttle --save

How to use

const throttle = require('t-throttle');
const thFunc = throttle(() => {
  console.log('exec');
}, 1000);

for (let i = 0; i < 100; i++) {
  thFunc();
}