is-my-json-valid
Advanced tools
Comparing version 1.3.8 to 1.3.9
@@ -121,3 +121,3 @@ var normalize = require('./normalize') | ||
if (node.minimum) { | ||
if (node.minimum !== undefined) { | ||
validate('if (%s < %d) {', name, node.minimum) | ||
@@ -128,3 +128,3 @@ error('must be more than '+node.minimum) | ||
if (node.maximum) { | ||
if (node.maximum !== undefined) { | ||
validate('if (%s > %d) {', name, node.maximum) | ||
@@ -242,2 +242,2 @@ error('must be less than '+node.maximum) | ||
module.exports = compile | ||
module.exports = compile |
{ | ||
"name": "is-my-json-valid", | ||
"version": "1.3.8", | ||
"version": "1.3.9", | ||
"description": "A JSONSchema / orderly validator that uses code generation to be extremely fast", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -115,1 +115,19 @@ var tape = require('tape') | ||
}) | ||
tape('minimum/maximum', function(t) { | ||
var validate = validator({ | ||
type: 'object', | ||
properties: { | ||
foo: { | ||
type: 'number', | ||
minimum: 0, | ||
maximum: 0 | ||
} | ||
} | ||
}) | ||
t.notOk(validate({foo:-42})) | ||
t.ok(validate({foo:0})) | ||
t.notOk(validate({foo:42})) | ||
t.end() | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22139
494