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
4
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 2.12.2 to 2.12.3

30

index.js

@@ -193,3 +193,3 @@ var genobj = require('generate-object-property')

validate('}')
}
}
}

@@ -399,3 +399,3 @@

validate('var %s = errors', prev)
} else {
} else {
validate('if (errors !== %s) {', prev)

@@ -451,3 +451,3 @@ ('errors = %s', prev)

if (type !== 'object') validate('if (%s) {', types.object(name))
validate('if (Object.keys(%s).length > %d) {', name, node.maxProperties)

@@ -462,3 +462,3 @@ error('has more properties than allowed')

if (type !== 'object') validate('if (%s) {', types.object(name))
validate('if (Object.keys(%s).length < %d) {', name, node.minProperties)

@@ -473,3 +473,3 @@ error('has less properties than allowed')

if (type !== 'array') validate('if (%s) {', types.array(name))
validate('if (%s.length > %d) {', name, node.maxItems)

@@ -484,3 +484,3 @@ error('has more items than allowed')

if (type !== 'array') validate('if (%s) {', types.array(name))
validate('if (%s.length < %d) {', name, node.minItems)

@@ -552,10 +552,12 @@ error('has less items than allowed')

validate.__defineGetter__('error', function() {
if (!validate.errors) return ''
return validate.errors
.map(function(err) {
return err.field+' '+err.message
})
.join('\n')
})
if (Object.defineProperty) {
Object.defineProperty(validate, 'error', {
get: function() {
if (!validate.errors) return ''
return validate.errors.map(function(err) {
return err.field + ' ' + err.message;
}).join('\n')
}
})
}

@@ -562,0 +564,0 @@ validate.toJSON = function() {

{
"name": "is-my-json-valid",
"version": "2.12.2",
"version": "2.12.3",
"description": "A JSONSchema validator that uses code generation to be extremely fast",

@@ -5,0 +5,0 @@ "main": "index.js",

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