serial-loop

v3.0.0
Async serial loop
serial loop greenpioneersolutions

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.
npm i serial-loop

Metadata

  • MIT
  • Whatever
  • GreenPioneer
  • released 7/18/2016

Downloads

Maintainers