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

Function getValidate

docs/scripts/ajv-validator.js:5678–5683  ·  view source on GitHub ↗
(cxt, sch)

Source from the content-addressed store, hash-verified

5676 },
5677 };
5678 function getValidate(cxt, sch) {
5679 const { gen } = cxt;
5680 return sch.validate
5681 ? gen.scopeValue("validate", { ref: sch.validate })
5682 : (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`;
5683 }
5684 exports.getValidate = getValidate;
5685 function callRef(cxt, v, sch, $async) {
5686 const { gen, it } = cxt;

Callers 1

callValidateFunction · 0.85

Calls 1

scopeValueMethod · 0.80

Tested by

no test coverage detected