Skip to main content
Module

x/spartanschema/mod.ts

Ultra-minimal JSON schemas with Typescript inference
Go to Latest
import * as spartanschema from "https://deno.land/x/spartanschema@v1.0.1/mod.ts";

Functions

A type predicate that checks whether schema is a valid Spartan Schema.

A curried function that checks whether value matches schema and returns a boolean.

Returns a parseable string representation of a Path, in JSONPath format.

Returns the zero value of this schema's root type.

Interfaces

The type of valid Spartan Schemas.

Type Aliases

Given a type S that describes the exact shape of a Schema, MatchesSchema<S> is the type of values that match that schema.

A more general type than PathArray, for any iterable value that can describe a specific location in a JSON document.

A path to a specific location in a JSON document.