@blockchaincommons/dcbor - v1.0.0-beta.3
    Preparing search index...

    Type Alias CborInput

    CborInput:
        | Cbor
        | CborNumber
        | string
        | boolean
        | null
        | undefined
        | Uint8Array
        | ByteString
        | CborDate
        | CborMap
        | readonly CborInput[]
        | ReadonlyMap<CborInput, CborInput>
        | ReadonlySet<CborInput>
        | ToCbor
        | { readonly [key: string]: CborInput }

    Values accepted by cbor():

    • Cbor nodes
    • numbers, bigints, strings, booleans, null, undefined
    • Uint8Array, ByteString
    • CborDate
    • CborMap, arrays, JavaScript Map and Set
    • objects implementing ToCbor
    • plain objects, which become CBOR maps
    cbor(42);                              // number
    cbor("hello"); // string
    cbor([1, 2, 3]); // array
    cbor(new Map([["key", "value"]])); // Map
    cbor({ name: "Alice", age: 30 }); // plain object -> CborMap