part-async-series

0.1.0 • Public • Published

Async Series

Installation

node.js:

npm install part-async-series

browser:

component install part/async-series

Example

var series = require('part-async-series');
 
var calls = [];
 
var a = function(context, next){
  setTimeout(function(){
    calls.push('a.' + context);
    next();
  }, 1);
}
var b = function(context, next){
  setTimeout(function(){
    calls.push('b.' + context);
    next();
  }, 1);
}
 
series([a, b], 'ctx', function(){
  assert('a.ctx' === calls[0]);
  assert('b.ctx' === calls[1]);
  done();
});

Licence

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i part-async-series

Weekly Downloads

2

Version

0.1.0

License

none

Last publish

Collaborators

  • viatropos