Version: v0.8.1 - Beta.  We welcome contributors & feedback.

Object.equals

equals($otherObject) -> boolean

Description

Calculate whether the object is equal to $otherObject.

In general, objects are equal if they are of the same type and have identical data.

This logic can be overridden by defining an onEquals hook method for the object.

$o1 = { a: 12, b: 34 }
$o2 = { b: 34, a: 12 }

$o1.equals($o2) //= true

$o1.equals([1, 2, 3]) // false

See Also