MCPcopy
hub / github.com/angular/angular / devModeEqual

Function devModeEqual

packages/core/src/util/comparison.ts:11–25  ·  view source on GitHub ↗
(a: any, b: any)

Source from the content-addressed store, hash-verified

9import {areIterablesEqual, isListLikeIterable} from './iterable';
10
11export function devModeEqual(a: any, b: any): boolean {
12 const isListLikeIterableA = isListLikeIterable(a);
13 const isListLikeIterableB = isListLikeIterable(b);
14 if (isListLikeIterableA && isListLikeIterableB) {
15 return areIterablesEqual(a, b, devModeEqual);
16 } else {
17 const isAObject = a && (typeof a === 'object' || typeof a === 'function');
18 const isBObject = b && (typeof b === 'object' || typeof b === 'function');
19 if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {
20 return true;
21 } else {
22 return Object.is(a, b);
23 }
24 }
25}

Callers 2

comparison.tsFile · 0.90
bindingUpdatedFunction · 0.90

Calls 2

isListLikeIterableFunction · 0.90
areIterablesEqualFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…