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

x/valibot/mod.ts>getDefaults

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
function getDefaults
import { getDefaults } from "https://deno.land/x/valibot@v0.35.0/mod.ts";

Returns the default values of the schema.

Hint: The difference to getDefault is that for object and tuple schemas this function recursively returns the default values of the subschemas instead of undefined.

Parameters

schema: TSchema

The schema to get them from.

Returns

The default values.