@blockchaincommons/dcbor - v1.0.0-beta.1
    Preparing search index...
    • Extract byte string value, throwing if type doesn't match.

      Parameters

      • cbor: Cbor

        CBOR value

      Returns Uint8Array

      Byte string

      With type 'WrongType' if cbor is not a byte string

      NOTE: decoded byte strings are zero-copy views aliasing the input buffer - mutating the input after decoding (or mutating the returned bytes) changes the other side. Call .slice() first if you need an independent copy. This is deliberate: the zero-copy decode performance profile is part of the library's contract.