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).

11 lines 341 B
import { NotSchema } from '../atomic-schema/index.js'; import { isJSONSchema } from '../json-schema/index.js'; export const notExtraction = { extract: ({ schema: { not }, split }) => { if (!isJSONSchema(not)) { return true; } return new NotSchema(split(not)); }, }; //# sourceMappingURL=not.js.map