Function throttling via the token-bucket algorithm
Function throttling via the token-bucket algorithm.
Install with npm.
$ npm install token-bucket
Install with component.
$ component install gjohnson/token-bucket
This will invoke the function the first 10 times, but then throttle the next 5.
var Bucket = ;var bucket = 10;var x = 15;while --xbucket;
This is similar to node-rate-limiter, but with more opinions and less options.