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

Function findMatchingIndex

packages/elements/src/extract-projectable-nodes.ts:40–54  ·  view source on GitHub ↗
(node: Node, selectors: string[], defaultIndex: number)

Source from the content-addressed store, hash-verified

38}
39
40function findMatchingIndex(node: Node, selectors: string[], defaultIndex: number): number {
41 let matchingIndex = defaultIndex;
42
43 if (isElement(node)) {
44 selectors.some((selector, i) => {
45 if (selector !== '*' && matchesSelector(node, selector)) {
46 matchingIndex = i;
47 return true;
48 }
49 return false;
50 });
51 }
52
53 return matchingIndex;
54}

Callers 1

extractProjectableNodesFunction · 0.85

Calls 3

isElementFunction · 0.90
matchesSelectorFunction · 0.90
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…