Edit this page

up.util up.util.isEqual(a, b)
JavaScript function

Returns whether the two arguments are equal by value.

Comparison protocol

  • By default up.util.isEqual() can compare strings, numbers, array-like values, plain objects and Date objects.
  • To make the copying protocol work with user-defined classes, see up.util.isEqual.key.
  • Objects without a defined comparison protocol are defined by reference (===).

Parameters

a
required

The first value to compare.

any
b
required

The second value to compare.

any

Return value

Whether the arguments are considered equal.

boolean