Skip to main content
Module

x/cav/serial.ts>serialize

A server framework for Deno
Go to Latest
function serialize
import { serialize } from "https://deno.land/x/cav@0.2.0-alpha.7/serial.ts";

Serializes a value recursively until it's JSON-compatible. Serializers can be plugged in to extend the accepted types beyond what Cav supports by default. If a value isn't recognized by any of the provided or default serializers, an error will be thrown.

Parameters

value: unknown
optional
serializers: Serializers | null

Returns

unknown