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.
// Create a new Asynchronizer, which waits for two specified events.asynchronizer = 'event one' 'event two';// Tell the Asynchronizer what to do when all of the events have happened.asynchronizerthen// This method will be fired once the events with name// 'event one' and 'event two' have occurred.console.log"All done! The collected data is: " + datajoin', ';;// Do some things here....// At some point in your code, event one has happened.// Tell the Asynchronizer about it.asynchronizercheck'event one' 'data for event one';// At this point the Asynchronizer still waits for event two,// so the callback does not get triggered.// Do more things here....// At some other point event two has happened.// Lets give Asynchronizer the good news.asynchronizercheck'event two' 'data for event two';// This is the last event that our Asynchronizer instance was waiting for.// So this will cause the Asynchronizer to call the callback given to it// in the "then" method, with the collected data.// In this example, the console would say:// "All done! The collected data is: data for event one, data for event two"
- set up development environment:
- run the tests:
script/watch_testsfor continuous testing
- release a new patch version:
- compile the binary:
gulp(this is done automatically for you in the release script)