MCPcopy Index your code
hub / github.com/cujojs/when / map

Function map

when.js:205–209  ·  view source on GitHub ↗

* Promise-aware array map function, similar to `Array.prototype.map()`, * but input array may contain promises or values. * @param {Array|Promise} promises array of anything, may contain promises and values * @param {function(x:*, index:Number):*} mapFunc map function which may * return a p

(promises, mapFunc)

Source from the content-addressed store, hash-verified

203 * or reject if any input promise rejects.
204 */
205 function map(promises, mapFunc) {
206 return when(promises, function(promises) {
207 return Promise.map(promises, mapFunc);
208 });
209 }
210
211 /**
212 * Filter the provided array of promises using the provided predicate. Input may

Callers

nothing calls this directly

Calls 1

whenFunction · 0.85

Tested by

no test coverage detected