This is useful when you want to detect changes on the top level without
recursively traversing nested objects.
Primitive values are compared by value.
Arrays and objects are compared by their own enumerable keys, but nested values are only compared
by reference. Circular objects are not supported.
NOTE: This function is intended to be used with plain old data inputs (i.e. mostly JSON).
Compares two values using shallow equality.
This is useful when you want to detect changes on the top level without recursively traversing nested objects.
Primitive values are compared by value. Arrays and objects are compared by their own enumerable keys, but nested values are only compared by reference. Circular objects are not supported.
Examples: