Function isEqualValueDefault

Comparer returns true if string representation of a and b are equal. Use isEqualDefault to compare using === semantics Uses toStringDefault to generate a string representation (via JSON.stringify).

Returns false if the ordering of fields is different, even though values are identical:

isEqualValueDefault({ a: 10, b: 20}, { b: 20, a: 10 }); // false

Use isEqualValueIgnoreOrder to ignore order (with an overhead of additional processing).

isEqualValueIgnoreOrder({ a: 10, b: 20}, { b: 20, a: 10 }); // true

Use isEqualValuePartial to partially match b against a.

  • Type Parameters

    • T

    Parameters

    Returns boolean

    True if the contents of a and b are equal