aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ajv/lib/dot/validate.jst
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ajv/lib/dot/validate.jst')
-rw-r--r--node_modules/ajv/lib/dot/validate.jst37
1 files changed, 10 insertions, 27 deletions
diff --git a/node_modules/ajv/lib/dot/validate.jst b/node_modules/ajv/lib/dot/validate.jst
index 273e4c37e..27393cf30 100644
--- a/node_modules/ajv/lib/dot/validate.jst
+++ b/node_modules/ajv/lib/dot/validate.jst
@@ -21,29 +21,11 @@
}}
{{? it.isTop }}
- {{? $async }}
- {{
- it.async = true;
- var $es7 = it.opts.async == 'es7';
- it.yieldAwait = $es7 ? 'await' : 'yield';
- }}
- {{?}}
-
- var validate =
- {{? $async }}
- {{? $es7 }}
- (async function
- {{??}}
- {{? it.opts.async != '*'}}co.wrap{{?}}(function*
- {{?}}
- {{??}}
- (function
+ var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) {
+ 'use strict';
+ {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
+ {{= '/\*# sourceURL=' + $id + ' */' }}
{{?}}
- (data, dataPath, parentData, parentDataProperty, rootData) {
- 'use strict';
- {{? $id && (it.opts.sourceCode || it.opts.processCode) }}
- {{= '/\*# sourceURL=' + $id + ' */' }}
- {{?}}
{{?}}
{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }}
@@ -70,7 +52,7 @@
{{?}}
{{? it.isTop}}
- });
+ };
return validate;
{{?}}
@@ -145,6 +127,10 @@
{{?}}
{{?}}
+{{? it.schema.$comment && it.opts.$comment }}
+ {{= it.RULES.all.$comment.code(it, '$comment') }}
+{{?}}
+
{{? $typeSchema }}
{{? it.opts.coerceTypes }}
{{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }}
@@ -176,9 +162,6 @@
{{ $closingBraces2 += '}'; }}
{{?}}
{{??}}
- {{? it.opts.v5 && it.schema.patternGroups }}
- {{ it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); }}
- {{?}}
{{~ it.RULES:$rulesGroup }}
{{? $shouldUseGroup($rulesGroup) }}
{{? $rulesGroup.type }}
@@ -237,7 +220,7 @@
validate.errors = vErrors; {{ /* don't edit, used in replace */ }}
return errors === 0; {{ /* don't edit, used in replace */ }}
{{?}}
- });
+ };
return validate;
{{??}}