A time-based execution limiter
Trickle is to limit executions to a certain amount of executions within a certain amount of time.
1 execution per 1000 milliseconds:
var Trickle = require'./lib/trickle'Trickle;var trickle = 1 1000;for var i = 0; i < 10; i++trickletrickle1if error console.logerror; return;console.log'ok ' + _i;;i;
The above code will output "ok 0", "ok 1", ..."ok 9", one line per second.