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

x/valibot/mod.ts>is

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

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

Type Parameters

TSchema extends BaseSchema<unknown, unknown, BaseIssue<unknown>>

Parameters

schema: TSchema

The schema to be used.

input: unknown

The input to be tested.

Returns

Whether the input matches the scheme.