summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js')
-rw-r--r--deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js b/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js
deleted file mode 100644
index 8f6e53f0f1..0000000000
--- a/deps/npm/node_modules/har-validator/node_modules/ajv/lib/v5.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-
-var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json';
-
-module.exports = {
- enable: enableV5,
- META_SCHEMA_ID: META_SCHEMA_ID
-};
-
-
-function enableV5(ajv) {
- var inlineFunctions = {
- 'switch': require('./dotjs/switch'),
- 'constant': require('./dotjs/constant'),
- '_formatLimit': require('./dotjs/_formatLimit'),
- 'patternRequired': require('./dotjs/patternRequired')
- };
-
- if (ajv._opts.meta !== false) {
- var metaSchema = require('./refs/json-schema-v5.json');
- ajv.addMetaSchema(metaSchema, META_SCHEMA_ID);
- }
- _addKeyword('constant');
- ajv.addKeyword('contains', { type: 'array', macro: containsMacro });
-
- _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit);
- _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit);
- ajv.addKeyword('formatExclusiveMaximum');
- ajv.addKeyword('formatExclusiveMinimum');
-
- ajv.addKeyword('patternGroups'); // implemented in properties.jst
- _addKeyword('patternRequired', 'object');
- _addKeyword('switch');
-
-
- function _addKeyword(keyword, types, inlineFunc) {
- var definition = {
- inline: inlineFunc || inlineFunctions[keyword],
- statements: true,
- errors: 'full'
- };
- if (types) definition.type = types;
- ajv.addKeyword(keyword, definition);
- }
-}
-
-
-function containsMacro(schema) {
- return {
- not: { items: { not: schema } }
- };
-}