Skip to main content
Module

x/cbor_redux/mod.ts>binarify

The Concise Binary Object Representation (CBOR) data format (RFC7049) implemented in pure JavaScript, revived.
Latest
function binarify
Re-export
import { binarify } from "https://deno.land/x/cbor_redux@1.0.0/mod.ts";

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

Parameters

value: any
  • A JavaScript value, usually an object or array, to be converted.
optional
replacer: CBORReplacer | Array<string | number> | null
  • A function that alters the behavior of the encoding process, or an array of strings or numbers naming properties of value that should be included in the output. If replacer is null or not provided, all properties of the object are included in the resulting CBOR buffer.

Returns

ArrayBuffer

The JavaScript value converted to CBOR format.