• 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 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 { equal } from "apprt-core/equals";

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