UNPKG

json-schema-to-yup

Version:

Build a Yup schema from a JSON Schema. Also supports custom/alternative schema models such as GraphQL type defs

21 lines (16 loc) 272 B
import { Base } from './base'; class Guard extends Base { constructor(obj, config) { super(config); this.obj = obj; } isValid() { return false; } verify() { return this.isPresent(this.obj) && this.isValid(this.obj); } } export { Guard };