hg-pyun / t-throttle

Tiny throttle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

t-throttle

npm npm NPM

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();
}

About

Tiny throttle


Languages

Language:JavaScript 100.0%