Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/index.ts>is

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

Checks if the input matches the scheme. By using a type predicate, this function can be used as a type guard.

Parameters

schema: TSchema

The schema to be used.

input: unknown

The input to be tested.

Returns

input is Input<TSchema>

Whether the input matches the scheme.