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.2.2 to 3.2.3

24

lib/index.js

@@ -207,3 +207,3 @@ 'use strict';

_lodash2.default.each(this.data.allOf, function (data, i) {
Schema.create(_this3.data.allOf[i], _this3.scope + '/allOf/' + i);
Schema.create(_this3.data.allOf[i], _lodash2.default.defaults(_this3.opts, { scope: _this3.scope + '/allOf/' + i }));
});

@@ -213,3 +213,3 @@ }

_lodash2.default.each(this.data.anyOf, function (data, i) {
Schema.create(_this3.data.anyOf[i], _this3.scope + '/anyOf/' + i);
Schema.create(_this3.data.anyOf[i], _lodash2.default.defaults(_this3.opts, { scope: _this3.scope + '/anyOf/' + i }));
});

@@ -219,7 +219,7 @@ }

_lodash2.default.each(this.data.oneOf, function (data, i) {
Schema.create(_this3.data.oneOf[i], _this3.scope + '/oneOf/' + i);
Schema.create(_this3.data.oneOf[i], _lodash2.default.defaults(_this3.opts, { scope: _this3.scope + '/oneOf/' + i }));
});
}
if (enumerableAndDefined(this.data, 'not')) {
Schema.create(this.data.not, this.scope + '/not');
Schema.create(this.data.not, _lodash2.default.defaults(this.opts, { scope: this.scope + '/not' }));
}

@@ -531,6 +531,6 @@ }

_lodash2.default.each(this.data.items, function (data, i) {
Schema.create(_this5.data.items[i], _this5.scope + '/items/' + i);
Schema.create(_this5.data.items[i], _lodash2.default.defaults(_this5.opts, { scope: _this5.scope + '/items/' + i }));
});
} else if (_typeof(this.data.items) === 'object') {
Schema.create(this.data.items, this.scope + '/items');
Schema.create(this.data.items, _lodash2.default.defaults(this.opts, { scope: this.scope + '/items' }));
} else {

@@ -542,3 +542,3 @@ throw new SchemaError(this.scope, 'items', data.items);

if (_typeof(this.data.additionalItems) === 'object') {
Schema.create(this.data.additionalItems, this.scope + '/additionalItems');
Schema.create(this.data.additionalItems, _lodash2.default.defaults(this.opts, { scope: this.scope + '/additionalItems' }));
} else if (typeof this.data.additionalItems !== 'boolean') {

@@ -711,3 +711,3 @@ throw new SchemaError(this.scope, 'additionalItems', data.additionalItems);

for (i in this.data.properties) {
Schema.create(this.data.properties[i], this.scope + '/properties/' + i);
Schema.create(this.data.properties[i], _lodash2.default.defaults(this.opts, { scope: this.scope + '/properties/' + i }));
}

@@ -717,3 +717,3 @@ }

for (i in this.data.patternProperties) {
Schema.create(this.data.patternProperties[i], this.scope + '/patternProperties/' + i);
Schema.create(this.data.patternProperties[i], _lodash2.default.defaults(this.opts, { scope: this.scope + '/patternProperties/' + i }));
}

@@ -723,3 +723,3 @@ }

if (_typeof(this.data.additionalProperties) === 'object') {
Schema.create(this.data.additionalProperties, this.scope + '/additionalProperties');
Schema.create(this.data.additionalProperties, _lodash2.default.defaults(this.opts, { scope: this.scope + '/additionalProperties' }));
} else if (typeof this.data.additionalProperties !== 'boolean') {

@@ -732,3 +732,3 @@ throw new SchemaError(this.scope, 'additionalProperties', data.additionalProperties);

if (_typeof(this.data.dependencies[i]) === 'object' && !Array.isArray(this.data.dependencies[i])) {
Schema.create(this.data.dependencies[i], this.scope + '/dependencies/' + i);
Schema.create(this.data.dependencies[i], _lodash2.default.defaults(this.opts, { scope: this.scope + '/dependencies/' + i }));
}

@@ -882,3 +882,3 @@ }

return vers.get(data.$schema, opts).then(function (schemaVersion) {
var _schemaVersion = Schema.create(schemaVersion, refs.scope(schemaVersion));
var _schemaVersion = Schema.create(schemaVersion, _lodash2.default.defaults(opts, { scope: refs.scope(schemaVersion) }));
_schemaVersion.validate(data);

@@ -885,0 +885,0 @@ return Schema.create(data, _opts);

{
"name": "jsonpolice",
"version": "3.2.2",
"version": "3.2.3",
"description": "JSON Schema parser and validator",

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

@@ -147,3 +147,3 @@ import _ from 'lodash';

_.each(this.data.allOf, (data, i) => {
Schema.create(this.data.allOf[i], this.scope + '/allOf/' + i);
Schema.create(this.data.allOf[i], _.defaults(this.opts, { scope: this.scope + '/allOf/' + i }));
});

@@ -153,3 +153,3 @@ }

_.each(this.data.anyOf, (data, i) => {
Schema.create(this.data.anyOf[i], this.scope + '/anyOf/' + i);
Schema.create(this.data.anyOf[i], _.defaults(this.opts, { scope: this.scope + '/anyOf/' + i }));
});

@@ -159,7 +159,7 @@ }

_.each(this.data.oneOf, (data, i) => {
Schema.create(this.data.oneOf[i], this.scope + '/oneOf/' + i);
Schema.create(this.data.oneOf[i], _.defaults(this.opts, { scope: this.scope + '/oneOf/' + i }));
});
}
if (enumerableAndDefined(this.data, 'not')) {
Schema.create(this.data.not, this.scope + '/not');
Schema.create(this.data.not, _.defaults(this.opts, { scope: this.scope + '/not' }));
}

@@ -439,6 +439,6 @@ }

_.each(this.data.items, (data, i) => {
Schema.create(this.data.items[i], this.scope + '/items/' + i);
Schema.create(this.data.items[i], _.defaults(this.opts, { scope: this.scope + '/items/' + i }));
});
} else if (typeof this.data.items === 'object') {
Schema.create(this.data.items, this.scope + '/items');
Schema.create(this.data.items, _.defaults(this.opts, { scope: this.scope + '/items' }));
} else {

@@ -450,3 +450,3 @@ throw new SchemaError(this.scope, 'items', data.items);

if (typeof this.data.additionalItems === 'object') {
Schema.create(this.data.additionalItems, this.scope + '/additionalItems');
Schema.create(this.data.additionalItems, _.defaults(this.opts, { scope: this.scope + '/additionalItems' }));
} else if (typeof this.data.additionalItems !== 'boolean') {

@@ -567,3 +567,3 @@ throw new SchemaError(this.scope, 'additionalItems', data.additionalItems);

for (i in this.data.properties) {
Schema.create(this.data.properties[i], this.scope + '/properties/' + i);
Schema.create(this.data.properties[i], _.defaults(this.opts, { scope: this.scope + '/properties/' + i }));
}

@@ -573,3 +573,3 @@ }

for (i in this.data.patternProperties) {
Schema.create(this.data.patternProperties[i], this.scope + '/patternProperties/' + i);
Schema.create(this.data.patternProperties[i], _.defaults(this.opts, { scope: this.scope + '/patternProperties/' + i }));
}

@@ -579,3 +579,3 @@ }

if (typeof this.data.additionalProperties === 'object') {
Schema.create(this.data.additionalProperties, this.scope + '/additionalProperties');
Schema.create(this.data.additionalProperties, _.defaults(this.opts, { scope: this.scope + '/additionalProperties' }));
} else if (typeof this.data.additionalProperties !== 'boolean') {

@@ -588,3 +588,3 @@ throw new SchemaError(this.scope, 'additionalProperties', data.additionalProperties);

if (typeof this.data.dependencies[i] === 'object' && !Array.isArray(this.data.dependencies[i])) {
Schema.create(this.data.dependencies[i], this.scope + '/dependencies/' + i);
Schema.create(this.data.dependencies[i], _.defaults(this.opts, { scope: this.scope + '/dependencies/' + i }));
}

@@ -721,3 +721,3 @@ }

return vers.get(data.$schema, opts).then(function(schemaVersion) {
var _schemaVersion = Schema.create(schemaVersion, refs.scope(schemaVersion));
var _schemaVersion = Schema.create(schemaVersion, _.defaults(opts, { scope: refs.scope(schemaVersion) }));
_schemaVersion.validate(data);

@@ -724,0 +724,0 @@ return Schema.create(data, _opts);

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