serial-loop
v3.0.0
Published
Async serial loop
Downloads
99
Readme
Serial-loop
Install
$ npm i -s 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
Roadmap
// 3.0 - Take over package, Update in es5 using standardjs
// 4.0 - Update to es6 , make it dynamic to not need len.