Skip to content

greenpioneersolutions/serial-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Packages

No packages published