Skip to main content
Module

x/cav/mod.ts>pack

A server framework for Deno
Go to Latest
function pack
import { pack } from "https://deno.land/x/cav@0.0.14/mod.ts";

Packs a value recursively until it's JSON-compatible. Packers can be plugged in to extend the accepted types beyond what Cav supports by default as well as the packers registered with usePackers(). Referential equality will be preserved whenever the same object or symbol value is encountered more than once. If a value isn't recognized by any of the used packers or the default packers, an error is thrown.

Parameters

value: unknown
optional
packers: Packers

Returns

unknown