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

Function validCondition

docs/scripts/ajv-validator.js:6205–6212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6203 return ["string", fmtDef, fmt];
6204 }
6205 function validCondition() {
6206 if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
6207 if (!schemaEnv.$async)
6208 throw new Error("async format in sync schema");
6209 return (0, codegen_1._) `await ${fmtRef}(${data})`;
6210 }
6211 return typeof format == "function" ? (0, codegen_1._) `${fmtRef}(${data})` : (0, codegen_1._) `${fmtRef}.test(${data})`;
6212 }
6213 }
6214 },
6215 };

Callers 1

validateFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected