MCPcopy
hub / github.com/angular/components / filter

Method filter

src/cdk/testing/component-harness.ts:678–684  ·  view source on GitHub ↗

* Filters a list of harnesses on this predicate. * @param harnesses The list of harnesses to filter. * @return A list of harnesses that satisfy this predicate.

(harnesses: T[])

Source from the content-addressed store, hash-verified

676 * @return A list of harnesses that satisfy this predicate.
677 */
678 async filter(harnesses: T[]): Promise<T[]> {
679 if (harnesses.length === 0) {
680 return [];
681 }
682 const results = await parallel(() => harnesses.map(h => this.evaluate(h)));
683 return harnesses.filter((_, i) => results[i]);
684 }
685
686 /**
687 * Evaluates whether the given harness satisfies this predicate.

Callers 15

propertyMethod · 0.45
bazel-bin.tsFile · 0.45
parseExampleFileFunction · 0.45
getMetadataFunction · 0.45
getSelectorsFunction · 0.45
$processMethod · 0.45
findDuplicateExportsMethod · 0.45
$processMethod · 0.45
$processMethod · 0.45
$processMethod · 0.45
_decorateClassLikeDocMethod · 0.45
_decorateClassDocMethod · 0.45

Calls 2

evaluateMethod · 0.95
parallelFunction · 0.90

Tested by 5

getVisibleTreeItemsFunction · 0.36
removeItemMethod · 0.36
getExpandedIdsFunction · 0.36
grabElementsForTestingFunction · 0.36
getExpandedNodesFunction · 0.36