Sha256: 50c5cba5894a7fb9874b3432355b46ec71b73c9368dafb1323ded8567cca8fc0

Contents?: true

Size: 853 Bytes

Versions: 5

Compression:

Stored size: 853 Bytes

Contents

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
function schemaHasRulesForType({ schema, self }, type) {
    const group = self.RULES.types[type];
    return group && group !== true && shouldUseGroup(schema, group);
}
exports.schemaHasRulesForType = schemaHasRulesForType;
function shouldUseGroup(schema, group) {
    return group.rules.some((rule) => shouldUseRule(schema, rule));
}
exports.shouldUseGroup = shouldUseGroup;
function shouldUseRule(schema, rule) {
    var _a;
    return (schema[rule.keyword] !== undefined ||
        ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined)));
}
exports.shouldUseRule = shouldUseRule;
//# sourceMappingURL=applicability.js.map

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
rapid_stack-0.1.1 templates/FrontEnd/node_modules/ajv/dist/compile/validate/applicability.js
rapid_stack-0.1.0 templates/FrontEnd/node_modules/ajv/dist/compile/validate/applicability.js
trusty-cms-6.3.1 node_modules/ajv/dist/compile/validate/applicability.js
pcp-server-ruby-sdk-0.0.6 node_modules/ajv/dist/compile/validate/applicability.js
pcp-server-ruby-sdk-0.1.0 node_modules/ajv/dist/compile/validate/applicability.js