MCPcopy Index your code
hub / github.com/nodejs/node / findMap

Function findMap

test/fixtures/snapshot/typescript.js:546–554  ·  view source on GitHub ↗

* Returns the first truthy result of `callback`, or else fails. * This is like `forEach`, but never returns undefined.

(array, callback)

Source from the content-addressed store, hash-verified

544 * This is like `forEach`, but never returns undefined.
545 */
546 function findMap(array, callback) {
547 for (var i = 0; i < array.length; i++) {
548 var result = callback(array[i], i);
549 if (result) {
550 return result;
551 }
552 }
553 return ts.Debug.fail();
554 }
555 ts.findMap = findMap;
556 function contains(array, value, equalityComparer) {
557 if (equalityComparer === void 0) { equalityComparer = equateValues; }

Callers

nothing calls this directly

Calls 2

callbackFunction · 0.70
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…