1.0.2 • Published 8 years ago

chainz v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Chainz

Build Status

Helps call an array of async functions in order, by injecting a next callback.

  var chain = require('chainz');

  const asyncFunctionOne = next => {
    // do something asnyc
    next('cheese'); // calls asyncFunctionTwo
  };

  const asyncFunctionTwo = (message, next) => {
    // do something asnyc
    console.log(message); // cheese
    next('peanut butter'); // calls asyncFunctionThree
  };

  const asyncFunctionThree = message => {
    // done
    console.log(message); // peanut butter
  };

  chain(asyncFunctionOne, asyncFunctionTwo, asyncFunctionThree);
1.0.2

8 years ago

1.0.1

8 years ago

0.1.0

9 years ago

1.0.0

9 years ago