"Returns a promise containing the result of the promisified mappingFn on its elements. Order is preserved. Additionally, rejection occurs if any of the promises reject.
$ npm install promise.mapper --save
var map = require('promise.mapper')
var makeRequest = (input) => http.Get(input).then(data => data.statusCode)
map([
'test.com',
'malwarehacks42.ru'
requestGoogle, // promise
], makeRequest).then((result) => {
console.log(result) // [200, 400, 200]
})
Returns a promise containing the result of the promisified mappingFn on its elements. Order is preserved. Additionally, rejection occurs if any of the promises reject.
A sequence of promises or instanceof Iterable
A mapping function that returns a promise