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

Function findLastIndex

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

Source from the content-addressed store, hash-verified

531 }
532 ts.findIndex = findIndex;
533 function findLastIndex(array, predicate, startIndex) {
534 for (var i = startIndex === undefined ? array.length - 1 : startIndex; i >= 0; i--) {
535 if (predicate(array[i], i)) {
536 return i;
537 }
538 }
539 return -1;
540 }
541 ts.findLastIndex = findLastIndex;
542 /**
543 * Returns the first truthy result of `callback`, or else fails.

Callers

nothing calls this directly

Calls 1

predicateFunction · 0.50

Tested by

no test coverage detected