Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

decode

import { decode } from "https://raw.githubusercontent.com/aaronhuggins/cbor-redux/0c8b3f4fa619fee986dd91e254d999fc9cfd396e/mod.ts";

Converts a Concise Binary Object Representation (CBOR) buffer into an object.

function decode<T = any>(
data: ArrayBuffer | SharedArrayBuffer,
reviver?: CBORReviver | null,
cborOptions?: CBOROptions,
): T;
§
decode<T = any>(data: ArrayBuffer | SharedArrayBuffer, reviver?: CBORReviver | null, cborOptions?: CBOROptions): T
[src]

§Type Parameters

§
T = any
[src]

§Parameters

§
data: ArrayBuffer | SharedArrayBuffer
[src]
  • A valid CBOR buffer.
§
reviver?: CBORReviver | null optional
[src]
  • If a function, this prescribes how the value originally produced by parsing is transformed, before being returned.
§
cborOptions?: CBOROptions optional
[src]

§Return Type

§

The CBOR buffer converted to a JavaScript value.