throttle-factory
v1.0.0
Published
Another library to throttle calls. Seamlessly throttle calls.
Downloads
3
Readme
throttle-factory
Another library to throttle calls. Seamlessly throttle calls.
var throttleFactory = require("throttle-factory");
var throttle = throttleFactory(10, 1000);
// these 100 calls will take 10 seconds
for (var i = 0; i < 100; i++) {
throttle.execute(() => {
console.log("do something");
});
}