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

jsonpolice

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonpolice - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

46

lib/index.js

@@ -199,24 +199,27 @@ 'use strict';

path = path || '';
try {
if (enumerableAndDefined(this.data, 'type')) {
data = this.validateType(data, path);
data = this.default(data);
if (typeof data !== 'undefined') {
try {
if (enumerableAndDefined(this.data, 'type')) {
data = this.validateType(data, path);
}
if (enumerableAndDefined(this.data, 'enum')) {
data = this.validateEnum(data, path);
}
if (enumerableAndDefined(this.data, 'allOf')) {
data = this.validateAllOf(data, path);
}
if (enumerableAndDefined(this.data, 'anyOf')) {
data = this.validateAnyOf(data, path);
}
if (enumerableAndDefined(this.data, 'oneOf')) {
data = this.validateOneOf(data, path);
}
if (enumerableAndDefined(this.data, 'not')) {
data = this.validateNot(data, path);
}
} catch (e) {
delete this[__validating];
throw e;
}
if (enumerableAndDefined(this.data, 'enum')) {
data = this.validateEnum(data, path);
}
if (enumerableAndDefined(this.data, 'allOf')) {
data = this.validateAllOf(data, path);
}
if (enumerableAndDefined(this.data, 'anyOf')) {
data = this.validateAnyOf(data, path);
}
if (enumerableAndDefined(this.data, 'oneOf')) {
data = this.validateOneOf(data, path);
}
if (enumerableAndDefined(this.data, 'not')) {
data = this.validateNot(data, path);
}
} catch (e) {
delete this[__validating];
throw e;
}

@@ -586,3 +589,2 @@ delete this[__validating];

value: function validateType(data, path) {
data = this.default(data);
var props = Object.keys(data);

@@ -589,0 +591,0 @@ if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object' || Array.isArray(data)) {

{
"name": "jsonpolice",
"version": "3.0.0",
"version": "3.0.1",
"description": "JSON Schema parser and validator",

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

@@ -137,24 +137,27 @@ import _ from 'lodash';

path = path || '';
try {
if (enumerableAndDefined(this.data, 'type')) {
data = this.validateType(data, path);
data = this.default(data);
if (typeof data !== 'undefined') {
try {
if (enumerableAndDefined(this.data, 'type')) {
data = this.validateType(data, path);
}
if (enumerableAndDefined(this.data, 'enum')) {
data = this.validateEnum(data, path);
}
if (enumerableAndDefined(this.data, 'allOf')) {
data = this.validateAllOf(data, path);
}
if (enumerableAndDefined(this.data, 'anyOf')) {
data = this.validateAnyOf(data, path);
}
if (enumerableAndDefined(this.data, 'oneOf')) {
data = this.validateOneOf(data, path);
}
if (enumerableAndDefined(this.data, 'not')) {
data = this.validateNot(data, path);
}
} catch(e) {
delete this[__validating];
throw e;
}
if (enumerableAndDefined(this.data, 'enum')) {
data = this.validateEnum(data, path);
}
if (enumerableAndDefined(this.data, 'allOf')) {
data = this.validateAllOf(data, path);
}
if (enumerableAndDefined(this.data, 'anyOf')) {
data = this.validateAnyOf(data, path);
}
if (enumerableAndDefined(this.data, 'oneOf')) {
data = this.validateOneOf(data, path);
}
if (enumerableAndDefined(this.data, 'not')) {
data = this.validateNot(data, path);
}
} catch(e) {
delete this[__validating];
throw e;
}

@@ -442,3 +445,2 @@ delete this[__validating];

validateType(data, path) {
data = this.default(data);
var props = Object.keys(data);

@@ -445,0 +447,0 @@ if (typeof data !== 'object' || Array.isArray(data)) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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