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

    Function asSingle

    • Returns the single CBOR element if this is a 'single' variant.

      Parameters

      Returns Cbor | undefined

      The CBOR value if single, undefined otherwise

      const element: WalkElement = { type: 'single', cbor: someCbor };
      const cbor = asSingle(element); // Returns someCbor