* 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)
| 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 |