@gmaclennan/serial-loop
v0.0.1
Published
Async serial loop
Downloads
3
Readme
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