Skip to content

Instantly share code, notes, and snippets.

@dreadjr
Last active March 12, 2016 13:15
Show Gist options
  • Save dreadjr/4687935 to your computer and use it in GitHub Desktop.
Save dreadjr/4687935 to your computer and use it in GitHub Desktop.
var rateLimit = require('function-rate-limit');
var fn = rateLimit(5, 60000, function(n) {
console.log('request'+n);
});
var x = 0;
console.log('0 minute');
setInterval(function() {
console.log((++x)+' minute');
}, 60000);
var n = 0;
setInterval(function() {
fn(n++);
}, 100);
@daslicht
Copy link

Hi, is it possible to solve this with your approach ?
http://stackoverflow.com/questions/35958076/initial-burst-node-stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment