rauricoste-promise-traverse
v0.0.3
Published
Sumary ===
Downloads
5
Readme
Sumary
Provides a function to traverse an array, create a Promise
for
each item and chain the promises so that they are executed one
after another.
Install
Through npm :
npm install --save rauricoste-promise-traverse
Usage
const Traverse = require("rauricoste-promise-traverse");
Traverse([1, 2, 3], value => {
return Promise.resolve(value + 1);
}).then(result => {
// result will be [2, 3, 4] but promises have been executed
// one after another.
});