0.0.1 • Published 8 years ago
@gmaclennan/serial-loop v0.0.1
serial-loop
Async serial loop. See also parallel-loop
Install
$ npm install serial-loop
Usage
var loop = require('serial-loop')
loop(10, each, function (error) {
console.log('done, error? ', error)
});
function each (next, i) {
setTimeout(function () {
console.log(i)
next()
}, 1000)
}
Will output:
0
1
2
3
3
4
5
6
7
8
9
end
0.0.1
8 years ago