• Deep equality test function. Null and undefined treated as equal.

    • If a is an 'object' and provides an equals function, then the method will delegate to it.
    • If a is an 'object' without an equals then a and b are equal if all (own) properties are equal.
    • If a and b are arrays then both will be equal if all items are equal.

    Parameters

    • a: any

      value or object to compare with b

    • b: any

      value or object to compare with a

    Returns boolean

    true if a is equal to b.

    import { deepEqual } from "apprt-core/equals";

    if (deepEqual(a, b)){
    // do something if true
    }