BlueGit

blue-star danique-bot

Files

danique-bot / node_modules / throttleit / example.js

example.js

Import template
timfa Tim · pushed by timfa · 4 years ago
c788ad20 History
example.js 221 B Download Raw
1
2var throttle = require('./');
3
4function onprogress(n) {
5 console.log('progress %s%', n);
6}
7
8onprogress = throttle(onprogress, 500);
9
10var n = 0;
11setInterval(function(){
12 if (n >= 100) return;
13 onprogress(n++);
14}, 50);