Function isEqualValueIgnoreOrder

  • 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 {@link isEqualValueDefault} if it's not possible that field ordering will change. @returns True if the contents of a and b are equal

    Type Parameters

    • T

    Parameters

    Returns boolean