Skip to main content
Module

x/abstruct/bindings.ts>type

Abstract structure for JavaScript data validation
Latest
function type
import { type } from "https://deno.land/x/abstruct@1.0.0/bindings.ts";

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

Examples

Example 1

import { type } from "https://deno.land/x/abstruct@$VERSION/bindings.ts";
const validator = type("object")