MCPcopy
hub / github.com/cujojs/when / filter

Function filter

when.js:220–224  ·  view source on GitHub ↗

* Filter the provided array of promises using the provided predicate. Input may * contain promises and values * @param {Array|Promise} promises array of promises and values * @param {function(x:*, index:Number):boolean} predicate filtering predicate. * Must return truthy (or promise for tr

(promises, predicate)

Source from the content-addressed store, hash-verified

218 * for which predicate returned truthy.
219 */
220 function filter(promises, predicate) {
221 return when(promises, function(promises) {
222 return Promise.filter(promises, predicate);
223 });
224 }
225
226 return when;
227});

Callers

nothing calls this directly

Calls 1

whenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…