summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js')
-rw-r--r--deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js b/deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js
deleted file mode 100644
index 44830ad7..00000000
--- a/deps/node/deps/npm/node_modules/ajv/lib/compile/rules.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var ruleModules = require('./_rules')
- , toHash = require('./util').toHash;
-
-module.exports = function rules() {
- var RULES = [
- { type: 'number',
- rules: [ { 'maximum': ['exclusiveMaximum'] },
- { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
- { type: 'string',
- rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
- { type: 'array',
- rules: [ 'maxItems', 'minItems', 'uniqueItems', 'contains', 'items' ] },
- { type: 'object',
- rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
- { 'properties': ['additionalProperties', 'patternProperties'] } ] },
- { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf' ] }
- ];
-
- var ALL = [ 'type' ];
- var KEYWORDS = [
- 'additionalItems', '$schema', '$id', 'id', 'title',
- 'description', 'default', 'definitions'
- ];
- var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
- RULES.all = toHash(ALL);
- RULES.types = toHash(TYPES);
-
- RULES.forEach(function (group) {
- group.rules = group.rules.map(function (keyword) {
- var implKeywords;
- if (typeof keyword == 'object') {
- var key = Object.keys(keyword)[0];
- implKeywords = keyword[key];
- keyword = key;
- implKeywords.forEach(function (k) {
- ALL.push(k);
- RULES.all[k] = true;
- });
- }
- ALL.push(keyword);
- var rule = RULES.all[keyword] = {
- keyword: keyword,
- code: ruleModules[keyword],
- implements: implKeywords
- };
- return rule;
- });
-
- if (group.type) RULES.types[group.type] = group;
- });
-
- RULES.keywords = toHash(ALL.concat(KEYWORDS));
- RULES.custom = {};
-
- return RULES;
-};