Asynchronizer ![Build Status](https://travis-ci.org/kevgo/asynchronizer.png?branch=master)
A promise that waits for a list of given of conditions to occur.
Optionally collects data from the conditions.
This can be used to collect data from a variety of asynchronous data sources,
and process them all at once when done.
asynchronizer = new Asynchronizer(['event one', 'event two']);
asynchronizer.then(function(data) {
console.log("All done! The collected data is: " + data.join(', '));
});
asynchronizer.check('event one', 'data for event one');
asynchronizer.check('event two', 'data for event two');
Development
- set up development environment:
npm install
- run the tests:
npm test
or script/watch_tests
for continuous testing - release a new patch version:
tools/release
- compile the binary:
gulp
(this is done automatically for you in the release script)