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

x/valibot/src/index.ts>coerce

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function coerce
import { coerce } from "https://deno.land/x/valibot@v0.22.0/src/index.ts";

Coerces the input of a schema to match the required type.

Parameters

schema: TSchema

The affected schema.

action: (value: unknown) => unknown

The coerceation action.

Returns

The passed schema.