promizr
Promizr is a modern Promise utility library which provides simple and powerful functions to manage complex async JavaScript.
Promizr provides more than 60 functions including the usual collections operations (map
, reduce
, filter
, each
…) as well as some common patterns for asynchronous control flow (parallel
, series
, waterfall
…). It also include Queues to manage the maximum number of tasks to run concurrently.
Installation
Using NPM:
$ npm install promizr
Usage
You could use promizr
in different context.
Global
ES Modules
;await ;
CommonJS
const promizr = ;await promizr;
AMD
// require.config.jsrequirejs; // module.js;
Quick Examples
// contents will be an array containing the content of each fileconst contents = await promizr; // entities will be an array containing an array of ids of public entitiesconst entities = await promizr; // operations will run in parallelconst result1 result2 result3 = await promizr
Documentation
You can find the package documentation here.
License
This project is under MIT License. See the LICENSE file for the full license text.