river-functions
Execute multiple asynchronous functions and when they are finished execute the callback with result parameters from the functions run.
Important note
This package is still under active development. Suggestions and issue reports are more than welcome!
Install
npm install river-functions
Development
npm install
npm install babel-cli -g
Testing
npm run test
Full example usage
// Log the errorsconst log = consolelog; // Demo function to execute asynchronouslyconst asyncFunction = { const err = Math === 1; // random between 1 and 10\. If 1, error is true if err return ; return ;} // Function to add to the river queueconst addToRiver = { return { ; }} // Demo recordsconst records = name: 'Item 1' value: 'Value 1' name: 'Item 2' value: 'Value 2' name: 'Item 3' value: 'Value 3' ; // Go through each of the records and store them in the river arrayconst functionsRiver = ; ; // Execute the river;