Open Cap Table Protocol Canton SDK - v0.2.125
    Preparing search index...

    Function ocfDeepEqual

    • Deep equality comparison for OCF objects with normalization.

      This comparison:

      • Normalizes numeric strings to fixed precision
      • Treats empty arrays/objects as equivalent to undefined
      • Trims string whitespace
      • Recursively compares nested objects

      Parameters

      • a: unknown

        First OCF object

      • b: unknown

        Second OCF object

      Returns boolean

      True if objects are semantically equal

        const obj1 = { quantity: '100.0000000000', name: 'Test' };
      const obj2 = { quantity: '100', name: 'Test' };
      ocfDeepEqual(obj1, obj2); // true - normalized numbers match