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

Function deepEqual

packages/common/upgrade/src/utils.ts:13–28  ·  view source on GitHub ↗
(a: any, b: any)

Source from the content-addressed store, hash-verified

11}
12
13export function deepEqual(a: any, b: any): boolean {
14 if (a === b) {
15 return true;
16 } else if (!a || !b) {
17 return false;
18 } else {
19 try {
20 if (a.prototype !== b.prototype || (Array.isArray(a) && Array.isArray(b))) {
21 return false;
22 }
23 return JSON.stringify(a) === JSON.stringify(b);
24 } catch (e) {
25 return false;
26 }
27 }
28}
29
30export function isAnchor(el: (Node & ParentNode) | Element | null): el is HTMLAnchorElement {
31 return (<HTMLAnchorElement>el).href !== undefined;

Callers 1

cacheStateMethod · 0.90

Calls 1

isArrayMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…