A simple asynchronous tool
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.js
package.json

README.md

traverse-chain

A simple asynchronous tool

Installation

$ npm install traverse-chain

Example

var Chain = require('traverse-chain');
var chain = new Chain();

chain.add(
  function() {
    setTimeout(function() {
      chain.next();
    }, 2000);
  },
  function() {
    setTimeout(function() {
      chain.next();
    }, 1000); 
  }
)

chain.traverse(function() {
  // done
});

License

MIT