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

Function unorderedRemoveFirstItemWhere

test/fixtures/snapshot/typescript.js:2373–2381  ·  view source on GitHub ↗

Remove the *first* element satisfying `predicate`.

(array, predicate)

Source from the content-addressed store, hash-verified

2371 ts.unorderedRemoveItem = unorderedRemoveItem;
2372 /** Remove the *first* element satisfying `predicate`. */
2373 function unorderedRemoveFirstItemWhere(array, predicate) {
2374 for (var i = 0; i < array.length; i++) {
2375 if (predicate(array[i])) {
2376 unorderedRemoveItemAt(array, i);
2377 return true;
2378 }
2379 }
2380 return false;
2381 }
2382 function createGetCanonicalFileName(useCaseSensitiveFileNames) {
2383 return useCaseSensitiveFileNames ? identity : toFileNameLowerCase;
2384 }

Callers 1

unorderedRemoveItemFunction · 0.85

Calls 2

unorderedRemoveItemAtFunction · 0.85
predicateFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…