TS-Scribe - v0.6.2
    Preparing search index...

    Function objectDeepEquals

    • Compares two objects (or nested structures) for deep equality. This function performs a recursive comparison to check if the two objects are equivalent, including all nested properties or elements. It returns true if the objects are deeply equal, and false otherwise.

      Parameters

      • object1: Nestable

        The first object or nested structure to compare.

      • object2: Nestable

        The second object or nested structure to compare.

      Returns boolean

      true if the objects are deeply equal, false otherwise.

      const object1 = { a: 1, b: { x: 2, y: 3 } };
      const object2 = { a: 1, b: { x: 2, y: 3 } };
      const object3 = { a: 1, b: { x: 2, y: 4 } };

      objectDeepEquals(object1, object2); // true
      objectDeepEquals(object1, object3); // false