can.Object.same
Checks if two objects are the same.
can.Object.same(a, b, compares, aParent, bParent, deep)
Parameters
-
a
{Object}
An object to compare against
b
. -
b
{Object}
An object to compare against
a
. -
compares
{Object}
OptionalAn object that specifies how to compare properties. The keys of the
compares
object are names of properties in the objects to compare, and the values are functions that compare those properties. You can also pass'i'
to compare values as case-insensitive strings, ornull
not to compare the properties at all.
Returns
{Object}
Whether the two objects have the same properties and values.
This function does not work with objects that create circular references.
Examples