Go to repository
Internal

Function objectEquals

Answer if two objects are equal. Two objects are equal when they both have the exact same number of properties, with same names, and they have the same value in each property. To consider if two values of a property are equal the innerComparer is used. The expected value for innerComparer is the recursive comparer function in deepEquals.

Type Parameters

  • T

Parameters

  • objA: T

    The first object

  • objB: T

    The second object

  • innerComparer: ((a: T, b: T) => boolean)

    The function for testing if two inner elements are equal

      • (a, b): boolean
      • Parameters

        Returns boolean

Returns boolean

true if both object are equal, false otherwise.