summaryrefslogtreecommitdiff
path: root/node_modules/ajv-keywords/keywords/dot
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ajv-keywords/keywords/dot')
-rw-r--r--node_modules/ajv-keywords/keywords/dot/_formatLimit.jst116
-rw-r--r--node_modules/ajv-keywords/keywords/dot/patternRequired.jst33
-rw-r--r--node_modules/ajv-keywords/keywords/dot/switch.jst71
3 files changed, 0 insertions, 220 deletions
diff --git a/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst b/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst
deleted file mode 100644
index f7409655..00000000
--- a/node_modules/ajv-keywords/keywords/dot/_formatLimit.jst
+++ /dev/null
@@ -1,116 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-var {{=$valid}} = undefined;
-
-{{## def.skipFormatLimit:
- {{=$valid}} = true;
- {{ return out; }}
-#}}
-
-{{## def.compareFormat:
- {{? $isData }}
- if ({{=$schemaValue}} === undefined) {{=$valid}} = true;
- else if (typeof {{=$schemaValue}} != 'string') {{=$valid}} = false;
- else {
- {{ $closingBraces += '}'; }}
- {{?}}
-
- {{? $isDataFormat }}
- if (!{{=$compare}}) {{=$valid}} = true;
- else {
- {{ $closingBraces += '}'; }}
- {{?}}
-
- var {{=$result}} = {{=$compare}}({{=$data}}, {{# def.schemaValueQS }});
-
- if ({{=$result}} === undefined) {{=$valid}} = false;
-#}}
-
-
-{{? it.opts.format === false }}{{# def.skipFormatLimit }}{{?}}
-
-{{
- var $schemaFormat = it.schema.format
- , $isDataFormat = it.opts.$data && $schemaFormat.$data
- , $closingBraces = '';
-}}
-
-{{? $isDataFormat }}
- {{
- var $schemaValueFormat = it.util.getData($schemaFormat.$data, $dataLvl, it.dataPathArr)
- , $format = 'format' + $lvl
- , $compare = 'compare' + $lvl;
- }}
-
- var {{=$format}} = formats[{{=$schemaValueFormat}}]
- , {{=$compare}} = {{=$format}} && {{=$format}}.compare;
-{{??}}
- {{ var $format = it.formats[$schemaFormat]; }}
- {{? !($format && $format.compare) }}
- {{# def.skipFormatLimit }}
- {{?}}
- {{ var $compare = 'formats' + it.util.getProperty($schemaFormat) + '.compare'; }}
-{{?}}
-
-{{
- var $isMax = $keyword == 'formatMaximum'
- , $exclusiveKeyword = 'formatExclusive' + ($isMax ? 'Maximum' : 'Minimum')
- , $schemaExcl = it.schema[$exclusiveKeyword]
- , $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data
- , $op = $isMax ? '<' : '>'
- , $result = 'result' + $lvl;
-}}
-
-{{# def.$data }}
-
-
-{{? $isDataExcl }}
- {{
- var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr)
- , $exclusive = 'exclusive' + $lvl
- , $opExpr = 'op' + $lvl
- , $opStr = '\' + ' + $opExpr + ' + \'';
- }}
- var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}};
- {{ $schemaValueExcl = 'schemaExcl' + $lvl; }}
-
- if (typeof {{=$schemaValueExcl}} != 'boolean' && {{=$schemaValueExcl}} !== undefined) {
- {{=$valid}} = false;
- {{ var $errorKeyword = $exclusiveKeyword; }}
- {{# def.error:'_formatExclusiveLimit' }}
- }
-
- {{# def.elseIfValid }}
-
- {{# def.compareFormat }}
- var {{=$exclusive}} = {{=$schemaValueExcl}} === true;
-
- if ({{=$valid}} === undefined) {
- {{=$valid}} = {{=$exclusive}}
- ? {{=$result}} {{=$op}} 0
- : {{=$result}} {{=$op}}= 0;
- }
-
- if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
-{{??}}
- {{
- var $exclusive = $schemaExcl === true
- , $opStr = $op; /*used in error*/
- if (!$exclusive) $opStr += '=';
- var $opExpr = '\'' + $opStr + '\''; /*used in error*/
- }}
-
- {{# def.compareFormat }}
-
- if ({{=$valid}} === undefined)
- {{=$valid}} = {{=$result}} {{=$op}}{{?!$exclusive}}={{?}} 0;
-{{?}}
-
-{{= $closingBraces }}
-
-if (!{{=$valid}}) {
- {{ var $errorKeyword = $keyword; }}
- {{# def.error:'_formatLimit' }}
-}
diff --git a/node_modules/ajv-keywords/keywords/dot/patternRequired.jst b/node_modules/ajv-keywords/keywords/dot/patternRequired.jst
deleted file mode 100644
index 6f82f626..00000000
--- a/node_modules/ajv-keywords/keywords/dot/patternRequired.jst
+++ /dev/null
@@ -1,33 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-
-{{
- var $key = 'key' + $lvl
- , $idx = 'idx' + $lvl
- , $matched = 'patternMatched' + $lvl
- , $dataProperties = 'dataProperties' + $lvl
- , $closingBraces = ''
- , $ownProperties = it.opts.ownProperties;
-}}
-
-var {{=$valid}} = true;
-{{? $ownProperties }}
- var {{=$dataProperties}} = undefined;
-{{?}}
-
-{{~ $schema:$pProperty }}
- var {{=$matched}} = false;
- {{# def.iterateProperties }}
- {{=$matched}} = {{= it.usePattern($pProperty) }}.test({{=$key}});
- if ({{=$matched}}) break;
- }
-
- {{ var $missingPattern = it.util.escapeQuotes($pProperty); }}
- if (!{{=$matched}}) {
- {{=$valid}} = false;
- {{# def.addError:'patternRequired' }}
- } {{# def.elseIfValid }}
-{{~}}
-
-{{= $closingBraces }}
diff --git a/node_modules/ajv-keywords/keywords/dot/switch.jst b/node_modules/ajv-keywords/keywords/dot/switch.jst
deleted file mode 100644
index 24d68cfc..00000000
--- a/node_modules/ajv-keywords/keywords/dot/switch.jst
+++ /dev/null
@@ -1,71 +0,0 @@
-{{# def.definitions }}
-{{# def.errors }}
-{{# def.setupKeyword }}
-{{# def.setupNextLevel }}
-
-
-{{## def.validateIf:
- {{# def.setCompositeRule }}
- {{ $it.createErrors = false; }}
- {{# def._validateSwitchRule:if }}
- {{ $it.createErrors = true; }}
- {{# def.resetCompositeRule }}
- {{=$ifPassed}} = {{=$nextValid}};
-#}}
-
-{{## def.validateThen:
- {{? typeof $sch.then == 'boolean' }}
- {{? $sch.then === false }}
- {{# def.error:'switch' }}
- {{?}}
- var {{=$nextValid}} = {{= $sch.then }};
- {{??}}
- {{# def._validateSwitchRule:then }}
- {{?}}
-#}}
-
-{{## def._validateSwitchRule:_clause:
- {{
- $it.schema = $sch._clause;
- $it.schemaPath = $schemaPath + '[' + $caseIndex + ']._clause';
- $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/_clause';
- }}
- {{# def.insertSubschemaCode }}
-#}}
-
-{{## def.switchCase:
- {{? $sch.if && {{# def.nonEmptySchema:$sch.if }} }}
- var {{=$errs}} = errors;
- {{# def.validateIf }}
- if ({{=$ifPassed}}) {
- {{# def.validateThen }}
- } else {
- {{# def.resetErrors }}
- }
- {{??}}
- {{=$ifPassed}} = true;
- {{# def.validateThen }}
- {{?}}
-#}}
-
-
-{{
- var $ifPassed = 'ifPassed' + it.level
- , $currentBaseId = $it.baseId
- , $shouldContinue;
-}}
-var {{=$ifPassed}};
-
-{{~ $schema:$sch:$caseIndex }}
- {{? $caseIndex && !$shouldContinue }}
- if (!{{=$ifPassed}}) {
- {{ $closingBraces+= '}'; }}
- {{?}}
-
- {{# def.switchCase }}
- {{ $shouldContinue = $sch.continue }}
-{{~}}
-
-{{= $closingBraces }}
-
-var {{=$valid}} = {{=$nextValid}};