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
2
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.7.0 to 2.8.0

6

index.js

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

var indent = 0
var error = function(msg, prop) {
var error = function(msg, prop, value) {
validate('errors++')

@@ -134,3 +134,3 @@ if (reporter === true) {

if (verbose) {
validate('validate.errors.push({field:%s,message:%s,value:%s})', JSON.stringify(formatName(prop || name)), JSON.stringify(msg), name)
validate('validate.errors.push({field:%s,message:%s,value:%s})', JSON.stringify(formatName(prop || name)), JSON.stringify(msg), value || name)
}

@@ -287,3 +287,3 @@ else {

if (filter) validate('delete %s', name+'['+keys+'['+i+']]')
error('has additional properties')
error('has additional properties', null, '"'+name+'."+'+keys+'['+i+']')
} else {

@@ -290,0 +290,0 @@ visit(name+'['+keys+'['+i+']]', node.additionalProperties, reporter, filter)

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

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

@@ -35,2 +35,4 @@ var tape = require('tape')

additionalProperties: false
}, {
verbose: true
})

@@ -40,2 +42,3 @@

t.notOk(validate({foo:'bar'}))
t.ok(validate.errors[0].value === 'data.foo', 'should output the property not allowed in verbose mode')
t.end()

@@ -42,0 +45,0 @@ })

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