0.0.6 • Published 7 years ago

callback-promises v0.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

callback-promises

Module to execute callback promises in a sequence.

Installing

git clone https://github.com/brunohl91/callback-promise.git

Example usage

Example usage can be found on test.js

var cal = require('./callback-promise.js');

cal.debug = true;

// Define callback to all promises executed
cal.setComplete(function (res) {
  console.log(res);
});

// Set values for each job
cal.setJobs(
  [ 10000, 2000, 300 ]
);

// Start iteration
cal.begin(function ( time ) {
  return new Promise(function (resolve, reject) {
    setTimeout(function () {
      resolve(time);
    }, time)
  })
})
0.0.6

7 years ago

0.0.5

7 years ago