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

Function subSchemaObjCode

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

Source from the content-addressed store, hash-verified

2866 return typeof it.schema != "boolean";
2867 }
2868 function subSchemaObjCode(it, valid) {
2869 const { schema, gen, opts } = it;
2870 if (opts.$comment && schema.$comment)
2871 commentKeyword(it);
2872 updateContext(it);
2873 checkAsyncSchema(it);
2874 const errsCount = gen.const("_errs", names_1.default.errors);
2875 typeAndKeywords(it, errsCount);
2876 // TODO var
2877 gen.var(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
2878 }
2879 function checkKeywords(it) {
2880 (0, util_1.checkUnknownRules)(it);
2881 checkRefsAndKeywords(it);

Callers 1

subschemaCodeFunction · 0.85

Calls 6

commentKeywordFunction · 0.85
updateContextFunction · 0.85
checkAsyncSchemaFunction · 0.85
typeAndKeywordsFunction · 0.85
varMethod · 0.80
constMethod · 0.45

Tested by

no test coverage detected