Edit this page

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

This feature is experimental. Please share your experiences so we know what to keep or change.

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.