@blockchaincommons/dcbor - v1.0.0-beta.1
    Preparing search index...
    Tag: {
        from(value: CborNumber, name?: string): Tag;
        equals(a: Tag, b: Tag): boolean;
    }

    Value-type companion for the Tag interface: an interface plus a merged const with a handful of members. It stays small and must not import the encode/format graph.

    Type Declaration

    • from: function
      • Create a Tag from its numeric value, optionally with a name.

        Tag.from(1, "date");
        Tag.from(12345);

        Parameters

        Returns Tag

    • equals: function
      • Compare two tags for equality: compares by value only (normalizing number vs bigint) and ignores the optional name.

        Parameters

        Returns boolean