MCPcopy Index your code
hub / github.com/json-editor/json-editor / groupKeywords

Function groupKeywords

docs/scripts/ajv-validator.js:2955–2973  ·  view source on GitHub ↗
(group)

Source from the content-addressed store, hash-verified

2953 groupKeywords(RULES.post);
2954 });
2955 function groupKeywords(group) {
2956 if (!(0, applicability_1.shouldUseGroup)(schema, group))
2957 return;
2958 if (group.type) {
2959 gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
2960 iterateKeywords(it, group);
2961 if (types.length === 1 && types[0] === group.type && typeErrors) {
2962 gen.else();
2963 (0, dataType_2.reportTypeError)(it);
2964 }
2965 gen.endIf();
2966 }
2967 else {
2968 iterateKeywords(it, group);
2969 }
2970 // TODO make it "ok" call?
2971 if (!allErrors)
2972 gen.if((0, codegen_1._) `${names_1.default.errors} === ${errsCount || 0}`);
2973 }
2974 }
2975 function iterateKeywords(it, group) {
2976 const { gen, schema, opts: { useDefaults }, } = it;

Callers 1

schemaKeywordsFunction · 0.85

Calls 4

iterateKeywordsFunction · 0.85
elseMethod · 0.80
endIfMethod · 0.80
ifMethod · 0.45

Tested by

no test coverage detected