Skip to main content

CommonDeepEqual

Callable

  • CommonDeepEqual<T>(obj1: unknown, obj2: T): obj1 is T

  • A simple deep equality check function which checks whether two objects are equal. The function traverses recursively into objects and arrays to check for equality. Primitives and simple types are considered equal as defined by ===.


    Type parameters

    • T

    Parameters

    • obj1: unknown

      The first object to compare

    • obj2: T

      The second object to compare

    Returns obj1 is T

    • TRUE if both objects are equal, up to arbitrarily deeply nested property values, FALSE otherwise.