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

Usage

import * as cborRedux from "https://raw.githubusercontent.com/aaronhuggins/cbor-redux/0c8b3f4fa619fee986dd91e254d999fc9cfd396e/mod.ts";

§Classes

SimpleValue

Convenience class for structuring a simple value.

TaggedValue

Convenience class for structuring a tagged value.

§Variables

CBOR

An intrinsic object that provides functions to convert JavaScript values to and from the Concise Binary Object Representation (CBOR) format.

EMPTY_KEY

A symbol which is emitted by the reviver and replacer functions when a value is not associated with a key or CBOR label.

OMIT_VALUE

A symbol which may be returned by the user in the encoder's replacer function to omit values.

§Functions

decode

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

encode

Converts a JavaScript value to a Concise Binary Object Representation (CBOR) buffer.

§Interfaces

CBOROptions

Options for the decoder.

§Type Aliases

CBORReplacer

A function to modify the behavior of the encoder; to omit values, return the OMIT_VALUE symbol.

CBORReviver

A function to modify values which are encountered during decoding.

DictionaryOption

Indicates that the decorder should use either Object or Map as the key/value dictionary.

ModeOption

Indicates that the decoder should loosely accept all keys, or striictly fail on duplicate keys.