1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 21:00:04 +02:00
Files
gitlit/node_modules/throttleit/example.js
2018-06-03 13:57:23 +02:00

15 lines
221 B
JavaScript

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