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

Function validateFunctionCode

docs/scripts/ajv-validator.js:2777–2786  ·  view source on GitHub ↗
(it)

Source from the content-addressed store, hash-verified

2775 const errors_1 = __webpack_require__(/*! ../errors */ "./node_modules/ajv/dist/compile/errors.js");
2776// schema compilation - generates validation function, subschemaCode (below) is used for subschemas
2777 function validateFunctionCode(it) {
2778 if (isSchemaObj(it)) {
2779 checkKeywords(it);
2780 if (schemaCxtHasRules(it)) {
2781 topSchemaObjCode(it);
2782 return;
2783 }
2784 }
2785 validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
2786 }
2787 exports.validateFunctionCode = validateFunctionCode;
2788 function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {
2789 if (opts.code.es5) {

Callers

nothing calls this directly

Calls 5

isSchemaObjFunction · 0.85
checkKeywordsFunction · 0.85
schemaCxtHasRulesFunction · 0.85
topSchemaObjCodeFunction · 0.85
validateFunctionFunction · 0.85

Tested by

no test coverage detected