Skip to main content
Module

x/abstruct/bindings.ts

Abstract structure for JavaScript data validation
Latest
import * as abstruct from "https://deno.land/x/abstruct@1.0.0/bindings.ts";

Variables

Bigint validator.

Boolean validator.

Empty validator. It checks the items is empty.

Factory for fixed array validator. It checks each item passes each Validator.

Float validator.

Integer validator.

Integer in the range -32768 ~ 32767 validator.

Integer in the range -2147483648 ~ 2147483647 validator.

Integer in the range -127 ~ 128 validator.

Factory for item validator. It checks each item of items.

Negative number validator.

Non-Empty validator. It checks items is non-empty.

Non-negative number validator.

Non-positive number validator.

Nullish(null or undefined) validator.

Number validator.

Factory for optional properties validator.

Positive number validator.

Factory for property key validator.

Factory for properties validator.

Factory for property value validator.

Single validator. It checks items is single.

String validator.

Symbol validator.

Integer in the range 0 ~ 65535 validator.

Integer in the range 0 ~ 4294967295 validator.

Integer in the range 0 ~ 255 validator.

Unique validator. It checks the each item is unique.

Valid Date validator.

Functions

Factory for validator composer like Logical AND. and composes multiple validators and creates a new validator. The composed validator executes the validator from left to right, just like the Logical AND operator. If the validation fails en route, the evaluation stops there.

Factory for range validator.

Factory for count validator. It checks count(size, length) of items.

Factory for enumerator validator.

Validator factory equivalent to strict equality(===) operator.

Factory for validator equivalent to greater than(<) operator.

Factory for validator equivalent to greater than or equal(<=) operator.

Factory for existence of property validator.

Validator factory equivalent to the instanceof operator.

Factory for validator equivalent to less than(>) operator.

Factory for validator equivalent to less than or equal to (>=) operator.

Factory for max count validator. It checks items count is less than or equal to limit.

Factory for min count validator. It checks items count is greater than or equal to limit.

Factory for validator equivalent to strict inequality(!==) operator.

Factory for validator inversion.

Factory for validator composer like Logical OR.

Factory for regex pattern validator.

Validator factory for JavaScript data type. The difference with typeof operator is that "object" does not match null.