JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57805
  • Score
    100M100P100Q145794F
  • License MIT

Call a function for each value in an array and return a Promise

Package Exports

  • promise-each

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (promise-each) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

promise-forEach

NPM version build status Test coverage Downloads

Call a function forEach value in an array and return a Promise.

Installation

$ npm install promise-forEach

Usage

const forEach = require('promise-forEach')

Promise.resolve([1, 2, 3])
  .then(forEach((val) => console.log(val)))
// => 1
// => 2
// => 3

Why?

This module is basically equivalent to bluebird.each, but it's handy to have the one function you need instead of a kitchen sink. Modularity! Especially handy if you're serving to the browser and need to reduce your javascript bundle size.

Works great in the browser with browserify!

See Also

License

MIT