Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-my-json-valid

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-my-json-valid - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

6

compile.js

@@ -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()
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc