hed-typescript API
    Preparing search index...

    Function readUnitPlurals

    • Read the plurals of unit names from the content of a unit_plurals.json file.

      Parameters

      • data: unknown

        The parsed content of a unit_plurals.json file.

      Returns Map<string, string>

      The plural of each listed unit name, by name (case-sensitive).

      src/data/json/unit_plurals.json is a verbatim copy of the unit_plurals.json that the HED specification publishes (docs/source/_static/unit_plurals.json); the unit_plurals.yml workflow fails when it drifts. No plural is derived by a rule (specification section 3.1.4.4): a unit name that is a key has that plural, a unit name that is not a key has none, and a unit symbol is never a key.

      An internalError if the file's file_version major number is not 1 (Appendix A.6.1).