Skip to main content

Function: deepEquals()

function deepEquals(a, b): boolean;

Deeply compares two values.

Supported values are:

  • Primitives
  • Boxed observables
  • Objects, observable objects
  • Arrays, observable arrays
  • Typed arrays
  • Maps, observable maps
  • Sets, observable sets
  • Tree nodes (optimized by using snapshot comparison internally)

Note that in the case of models the result will be false if their model IDs are different.

Parameters​

ParameterTypeDescription
aanyFirst value to compare.
banySecond value to compare.

Returns​

boolean

true if they are the equivalent, false otherwise.