Edit this page

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

This feature is experimental. It may be changed or removed in a future version.

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 any
b any

Return value

boolean

Whether the arguments are equal by value.