update node modules
This commit is contained in:
8
node_modules/ajv/lib/dotjs/validate.js
generated
vendored
8
node_modules/ajv/lib/dotjs/validate.js
generated
vendored
@@ -149,7 +149,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
var $schemaPath = it.schemaPath + '.type',
|
||||
$errSchemaPath = it.errSchemaPath + '/type',
|
||||
$method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';
|
||||
out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';
|
||||
out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';
|
||||
if ($coerceToTypes) {
|
||||
var $dataType = 'dataType' + $lvl,
|
||||
$coerced = 'coerced' + $lvl;
|
||||
@@ -302,7 +302,7 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
$rulesGroup = arr2[i2 += 1];
|
||||
if ($shouldUseGroup($rulesGroup)) {
|
||||
if ($rulesGroup.type) {
|
||||
out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';
|
||||
out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { ';
|
||||
}
|
||||
if (it.opts.useDefaults) {
|
||||
if ($rulesGroup.type == 'object' && it.schema.properties) {
|
||||
@@ -470,10 +470,6 @@ module.exports = function generate_validate(it, $keyword, $ruleType) {
|
||||
} else {
|
||||
out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';
|
||||
}
|
||||
out = it.util.cleanUpCode(out);
|
||||
if ($top) {
|
||||
out = it.util.finalCleanUpCode(out, $async);
|
||||
}
|
||||
|
||||
function $shouldUseGroup($rulesGroup) {
|
||||
var rules = $rulesGroup.rules;
|
||||
|
Reference in New Issue
Block a user