Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cav/pack.ts>packJson

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

Packs the value into a JSON string. This function is a one-liner:

return JSON.stringify(pack(value, packers || undefined), null, spaces);

Parameters

value: unknown
optional
packers: Packers | null
optional
spaces: string | number

Returns

string