all-done
A simple node package that supports firing a callback once all other callbacks are completed.
Installation
Simply install using npm.
$ npm install all-done
Usage
Basic usage
{ // ...} allDone = { // Do something once everything is complete} callback_maker = { // ...} ;
Note that any arguments that are passed from the some_function
call to it's
callback will be forwarded(including the this
context) to the optional_individual_callback
.
Caveats
In the example below, it is possible for the completion_callback
to be fired multiple times. The library does not prevent nor protect from this.
allDone = { console} callback_maker =
The above will output the following:
Callback 1DoneCallback 2Done