Comparer returns true if string representation of a and b are equal, regardless of field ordering.
Uses toStringOrdered to generate a string representation (via JSON.stringify`).
isEqualValueIgnoreOrder({ a:10, b:20}, { b:20, a:10 }); // true isEqualValue({ a:10, b:20}, { b:20, a:10 }); // false, fields are different order
There is an overhead to ordering fields. Use isEqualValueDefault if it's not possible that field ordering will change.
Comparer returns true if string representation of
aandbare equal, regardless of field ordering. UsestoStringOrderedto generate a string representation (via JSON.stringify`).There is an overhead to ordering fields. Use isEqualValueDefault if it's not possible that field ordering will change.