All Projects → yoshuawuyts → Promise Map

yoshuawuyts / Promise Map

Licence: mit
Map over an array and return a Promise.

Programming Languages

javascript
184084 projects - #8 most used programming language

promise-map

NPM version build status Test coverage Downloads

Map over an array and return a Promise.

Installation

$ npm install promise-map

Usage

const map = require('promise-map')

Promise.resolve([1, 2, 3])
  .then(map((val) => val + 1))
// => [2, 3, 4]

Why?

This module is basically equivalent to bluebird.map, 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].