BC-DCBOR TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Interface TagsStoreTrait

    Interface for tag store operations.

    interface TagsStoreTrait {
        assignedNameForTag(tag: Tag): string | undefined;
        nameForTag(tag: Tag): string;
        tagForValue(value: CborNumber): Tag | undefined;
        tagForName(name: string): Tag | undefined;
        nameForValue(value: CborNumber): string;
        summarizer(tag: CborNumber): CborSummarizer | undefined;
    }

    Implemented by

    Index

    Methods

    • Get the assigned name for a tag, if any.

      Parameters

      • tag: Tag

        The tag to look up

      Returns string | undefined

      The assigned name, or undefined if no name is registered

    • Get a display name for a tag.

      Parameters

      • tag: Tag

        The tag to get a name for

      Returns string

      The assigned name if available, otherwise the tag value as a string

    • Look up a tag by its numeric value.

      Parameters

      Returns Tag | undefined

      The Tag object if found, undefined otherwise

    • Look up a tag by its name.

      Parameters

      • name: string

        The tag name

      Returns Tag | undefined

      The Tag object if found, undefined otherwise

    • Get a display name for a tag value.

      Parameters

      Returns string

      The tag name if registered, otherwise the value as a string