UNPKG

json-schema-describes-subset

Version:

Tools for static JSON schema analysis, including functions to determine if one schema describes a subset of another or if a schema describes the empty set or to convert a schema to its disjunctive normal form (DNF).

12 lines 336 B
import isObject from 'lodash/isObject.js'; //#endregion GeneralJSONSchema export function isJSONSchema(value) { return isObject(value) || typeof value === 'boolean'; } export function assertJSONSchema(value) { if (isJSONSchema(value)) { return value; } return undefined; } //# sourceMappingURL=json-schema.js.map