diff options
Diffstat (limited to 'deps/npm/node_modules/ajv/lib/dot/_limit.jst')
-rw-r--r-- | deps/npm/node_modules/ajv/lib/dot/_limit.jst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/deps/npm/node_modules/ajv/lib/dot/_limit.jst b/deps/npm/node_modules/ajv/lib/dot/_limit.jst index 13e7649b34..f152189222 100644 --- a/deps/npm/node_modules/ajv/lib/dot/_limit.jst +++ b/deps/npm/node_modules/ajv/lib/dot/_limit.jst @@ -17,6 +17,15 @@ , $op = $isMax ? '<' : '>' , $notOp = $isMax ? '>' : '<' , $errorKeyword = undefined; + + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined + || typeof $schemaExcl == 'number' + || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } }} {{? $isDataExcl }} @@ -50,6 +59,14 @@ ) || {{=$data}} !== {{=$data}}) { var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; + {{ + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + }} {{??}} {{ var $exclIsNumber = typeof $schemaExcl == 'number' |