MCPcopy Create free account
hub / github.com/nodejs/node / find

Function find

test/fixtures/snapshot/typescript.js:503–511  ·  view source on GitHub ↗
(array, predicate)

Source from the content-addressed store, hash-verified

501 }
502 ts.every = every;
503 function find(array, predicate) {
504 for (var i = 0; i < array.length; i++) {
505 var value = array[i];
506 if (predicate(value, i)) {
507 return value;
508 }
509 }
510 return undefined;
511 }
512 ts.find = find;
513 function findLast(array, predicate) {
514 for (var i = array.length - 1; i >= 0; i--) {

Callers 3

findNextTokenFunction · 0.70
findPrecedingTokenFunction · 0.70
findEnclosingNodeFunction · 0.70

Calls 9

nodeHasTokensFunction · 0.85
isNonWhitespaceTokenFunction · 0.85
isWhiteSpaceOnlyJsxTextFunction · 0.85
findRightmostTokenFunction · 0.85
getChildrenMethod · 0.80
assertMethod · 0.80
forEachChildMethod · 0.80
predicateFunction · 0.50

Tested by

no test coverage detected