MCPcopy Create free account
hub / github.com/json-editor/json-editor / subschemaCode

Function subschemaCode

docs/scripts/ajv-validator.js:2847–2856  ·  view source on GitHub ↗
(it, valid)

Source from the content-addressed store, hash-verified

2845 }
2846// schema compilation - this function is used recursively to generate code for sub-schemas
2847 function subschemaCode(it, valid) {
2848 if (isSchemaObj(it)) {
2849 checkKeywords(it);
2850 if (schemaCxtHasRules(it)) {
2851 subSchemaObjCode(it, valid);
2852 return;
2853 }
2854 }
2855 (0, boolSchema_1.boolOrEmptySchema)(it, valid);
2856 }
2857 function schemaCxtHasRules({ schema, self }) {
2858 if (typeof schema == "boolean")
2859 return !schema;

Callers 1

subschemaMethod · 0.85

Calls 4

isSchemaObjFunction · 0.85
checkKeywordsFunction · 0.85
schemaCxtHasRulesFunction · 0.85
subSchemaObjCodeFunction · 0.85

Tested by

no test coverage detected