UNPKG

@hyperjump/json-schema

Version:

A JSON Schema validator with support for custom keywords, vocabularies, and dialects

14 lines (8 loc) 336 B
import { Validation } from "../experimental.js"; const id = "https://json-schema.org/keyword/if"; const compile = (schema, ast) => Validation.compile(schema, ast); const interpret = (ifSchema, instance, context) => { Validation.interpret(ifSchema, instance, context); return true; }; export default { id, compile, interpret };