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

Function arrayEquals

packages/core/src/util/array_utils.ts:19–33  ·  view source on GitHub ↗
(a: T[], b: T[], identityAccessor?: (value: T) => unknown)

Source from the content-addressed store, hash-verified

17 * the array.
18 */
19export function arrayEquals<T>(a: T[], b: T[], identityAccessor?: (value: T) => unknown): boolean {
20 if (a.length !== b.length) return false;
21 for (let i = 0; i < a.length; i++) {
22 let valueA = a[i];
23 let valueB = b[i];
24 if (identityAccessor) {
25 valueA = identityAccessor(valueA) as any;
26 valueB = identityAccessor(valueB) as any;
27 }
28 if (valueB !== valueA) {
29 return false;
30 }
31 }
32 return true;
33}
34
35/**
36 * Flattens an array.

Callers 1

resetMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…