MCPcopy Create free account
hub / github.com/angular/angular / areAllEquivalentPredicate

Function areAllEquivalentPredicate

packages/compiler/src/output/output_ast.ts:170–185  ·  view source on GitHub ↗
(
  base: T[],
  other: T[],
  equivalentPredicate: (baseElement: T, otherElement: T) => boolean,
)

Source from the content-addressed store, hash-verified

168}
169
170function areAllEquivalentPredicate<T>(
171 base: T[],
172 other: T[],
173 equivalentPredicate: (baseElement: T, otherElement: T) => boolean,
174) {
175 const len = base.length;
176 if (len !== other.length) {
177 return false;
178 }
179 for (let i = 0; i < len; i++) {
180 if (!equivalentPredicate(base[i], other[i])) {
181 return false;
182 }
183 }
184 return true;
185}
186
187export function areAllEquivalent<T extends {isEquivalent(other: T): boolean}>(
188 base: T[],

Callers 2

areAllEquivalentFunction · 0.85
isEquivalentMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected