Plain objects are compared by key sets, so key insertion order does not
matter. Arrays are ordered. Primitives use Object.is, so NaN equals
NaN. Non-plain objects (Date, Map, Set, class instances) are compared
by identity; metadata should therefore use plain JSON-compatible data when
structural equality is expected.
Compares two values structurally.
Plain objects are compared by key sets, so key insertion order does not matter. Arrays are ordered. Primitives use
Object.is, soNaNequalsNaN. Non-plain objects (Date,Map,Set, class instances) are compared by identity; metadata should therefore use plain JSON-compatible data when structural equality is expected.