first commit
This commit is contained in:
commit
eb2f504652
32490 changed files with 5731109 additions and 0 deletions
14
node_modules/throttleit/example.js
generated
vendored
Normal file
14
node_modules/throttleit/example.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
var throttle = require('./');
|
||||
|
||||
function onprogress(n) {
|
||||
console.log('progress %s%', n);
|
||||
}
|
||||
|
||||
onprogress = throttle(onprogress, 500);
|
||||
|
||||
var n = 0;
|
||||
setInterval(function(){
|
||||
if (n >= 100) return;
|
||||
onprogress(n++);
|
||||
}, 50);
|
||||
Loading…
Add table
Add a link
Reference in a new issue