Iterate over promises serially
Useful as a side-effect iterator. Prefer
p-map if you don't need side-effects, as it's concurrent.
$ npm install --save p-each-series
const pEachSeries = ;const keywords =//=> Promise'rainbow''pony';const iterator = ; //=> Promise;
Promise that is fulfilled when all promises in
input and ones returned from
iterator are fulfilled, or rejects if any of the promises reject. The fulfillment value is the original
Iterated over serially in the
Return value is ignored unless it's
Promise, then it's awaited before continuing with the next iteration.
- p-map-series - Map over promises serially
- p-pipe - Compose promise-returning & async functions into a reusable pipeline
- p-reduce - Reduce a list of values using promises into a promise for a value
- p-map - Map over promises concurrently
MIT © Sindre Sorhus