Last active
March 12, 2016 13:15
-
-
Save dreadjr/4687935 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, is it possible to solve this with your approach ?
http://stackoverflow.com/questions/35958076/initial-burst-node-stream