@cfworker/json-schema
Version:
A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.
4 lines (3 loc) • 415 B
TypeScript
import { Schema, SchemaDraft, ValidationResult } from './types.js';
export type Evaluated = Record<string | number, boolean>;
export declare function validate(instance: any, schema: Schema | boolean, draft?: SchemaDraft, lookup?: Record<string, Schema | boolean>, shortCircuit?: boolean, recursiveAnchor?: Schema | null, instanceLocation?: string, schemaLocation?: string, evaluated?: Evaluated): ValidationResult;