HED JavaScript Library
    Preparing search index...

    Class SchemaUnit

    SchemaUnit class

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _derivativeUnits: string[]

    The legal derivatives of this unit.

    _name: string

    The name of this schema entry.

    booleanAttributeNames: Set<string>

    The set of boolean attribute names this schema entry has.

    booleanAttributes: Set<SchemaAttribute>

    The set of boolean attributes this schema entry has.

    valueAttributeNames: Map<string, any>

    The collection of value attribute names this schema entry has.

    valueAttributes: Map<SchemaAttribute, any>

    The collection of value attributes this schema entry has.

    Accessors

    • get name(): string

      The name of this schema entry.

      Returns string

    Methods

    • Protected

      Memoize a property.

      Type Parameters

      • T

      Parameters

      • propertyName: string

        The property name.

      • valueComputer: () => T

        A function to compute the property's value.

      Returns T

      The computed value.

    • Returns Generator<string, void, unknown>

    • Retrieve the value of a value attribute (by name) on this schema entry.

      Parameters

      • attributeName: string

        The attribute whose value should be returned.

      • alwaysReturnArray: boolean = false

        Whether to return a singleton array instead of a scalar value.

      Returns any

      The value of the attribute.

    • Determine if a value has this unit.

      Parameters

      • value: string

        either the whole value or the part after a blank (if not a prefix unit)

      Returns boolean

      Whether the value has these units.