hed-typescript API
    Preparing search index...

    Function replaceColumnReferences

    • Replace the curly-brace column references in a sidecar annotation.

      A reference whose replacement is missing, empty, or n/a is removed with the commas and parentheses it leaves behind (specification 3.2.9.3 rule 3). Row assembly and the sidecar check of rule 10 both use this function, so a reference is removed in the same way in both.

      Parameters

      • annotation: string

        A sidecar annotation, possibly with curly-brace references.

      • lookup: (columnName: string) => string | null | undefined

        The replacement for a referenced column name, or undefined or null to remove the reference.

      Returns string

      The annotation with every reference replaced or removed.