serial-loop

3.0.0 • Public • Published

Serial-loop

npm downloads Dependency Status devDependency Status npm-issues js-standard-style Build Status js-standard-style

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.

Package Sidebar

Install

npm i serial-loop

Weekly Downloads

4

Version

3.0.0

License

MIT

Last publish

Collaborators

  • npm