Canboat ts-pgns
    Preparing search index...

    Function mapNameKeysToCamelCase

    • Maps the keys of a PGN object from their original names to camelCase IDs as defined in a matching definition.

      This function searches for a matching definition for the provided PGN object, creates a new PGN structure, and copies over non-field properties. It then maps field values from their original names to their corresponding IDs, including handling repeating field sets if present.

      Parameters

      • pgn: any

        The PGN object to be transformed.

      Returns PGN

      A new PGN object with keys mapped to camelCase IDs.

      If no matching definition is found for the provided PGN object.