MCPcopy Index your code
hub / github.com/angular/angular / first

Function first

packages/compiler-cli/test/mocks.ts:88–94  ·  view source on GitHub ↗
(a: T[], cb: (value: T) => T | undefined)

Source from the content-addressed store, hash-verified

86}
87
88function first<T>(a: T[], cb: (value: T) => T | undefined): T | undefined {
89 for (const value of a) {
90 const result = cb(value);
91 if (result != null) return result;
92 }
93 return;
94}
95
96function getEntryFromFiles(parts: string[], files: Entry) {
97 let current = files;

Callers 15

dbReadyFunction · 0.85
resetDbFunction · 0.85
validators_spec.tsFile · 0.85
getEntryMethod · 0.85
runSeriallyFunction · 0.85
firstValueFromFunction · 0.85
runCanDeactivateChecksFunction · 0.85
runCanActivateChecksFunction · 0.85
runCanActivateFunction · 0.85

Calls 1

cbFunction · 0.50

Tested by 2

runSeriallyFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…