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

    Function normalizeRequiredArrayFields

    • Normalize required array fields in OCF data. This ensures array fields that are null/undefined become empty arrays.

      Uses lazy cloning - only creates a copy when modification is actually needed, and clones once then mutates the clone for efficiency.

      Type Parameters

      • T extends Record<string, unknown>

      Parameters

      • entityType: string

        The OCF entity type

      • data: T

        The OCF data that may have null/undefined array fields

      Returns { data: T; normalizedFields: string[] }

      The normalized data with array fields as arrays