New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

obey

Package Overview
Dependencies
Maintainers
3
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obey - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

14

build/lib/validators.js

@@ -95,3 +95,8 @@ 'use strict';

var sub = def.requireIf;
if (_dotObject2.default.pick(sub, data) !== undefined && value === undefined) {
if ((typeof sub === 'undefined' ? 'undefined' : _typeof(sub)) === 'object') {
var field = Object.keys(sub)[0];
if (_dotObject2.default.pick(field, data) === sub[field] && value === undefined) {
errors.push({ type: type, sub: sub, key: key, value: value, message: 'Value required by existing \'' + field + '\' value' });
}
} else if (_dotObject2.default.pick(sub, data) !== undefined && value === undefined) {
errors.push({ type: type, sub: sub, key: key, value: value, message: 'Value required because \'' + sub + '\' exists' });

@@ -113,3 +118,8 @@ }

var sub = def.requireIfNot;
if (_dotObject2.default.pick(sub, data) === undefined && value === undefined) {
if ((typeof sub === 'undefined' ? 'undefined' : _typeof(sub)) === 'object') {
var field = Object.keys(sub)[0];
if (_dotObject2.default.pick(field, data) !== sub[field] && value === undefined) {
errors.push({ type: type, sub: sub, key: key, value: value, message: 'Value required because \'' + field + '\' value is not one specified' });
}
} else if (_dotObject2.default.pick(sub, data) === undefined && value === undefined) {
errors.push({ type: type, sub: sub, key: key, value: value, message: 'Value required because \'' + sub + '\' is undefined' });

@@ -116,0 +126,0 @@ }

2

package.json
{
"name": "obey",
"version": "1.6.1",
"version": "1.7.0",
"description": "Data modelling and validation library",

@@ -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