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

mastercheck

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mastercheck - npm Package Compare versions

Comparing version 0.2.11 to 0.2.12

21

lib/mastercheck.js

@@ -87,3 +87,3 @@ /**

* select: [ 'apple_a1', 'apple_b2', 'apple_c3' ], // Select match check. Default do not check.
* existIn: 'Item', // exist in keyMap check. Default do not check.
* existIn: [ 'Item' ], // exist in keyMap check. Default do not check.
* };

@@ -116,4 +116,19 @@ */

}
if (_option.hasOwnProperty('existIn') && this._keyMap.hasOwnProperty(_option.existIn) && !~this._keyMap[_option.existIn].indexOf(data)) {
return data + ' should be exist in ' + _option.existIn;
if (_option.hasOwnProperty('existIn')) {
if (Array.isArray(_option.existIn)) {
var has = false;
for (var i = 0; i < _option.existIn.length; i++) {
if (this._keyMap[_option.existIn[i]] && ~this._keyMap[_option.existIn[i]].indexOf(data)) {
has = true;
break;
}
}
if (!has) {
return data + ' should be exist in ' + _option.existIn;
}
} else {
if (!this._keyMap[_option.existIn] || !~this._keyMap[_option.existIn].indexOf(data)) {
return data + ' should be exist in ' + _option.existIn;
}
}
}

@@ -120,0 +135,0 @@ };

2

package.json
{
"name": "mastercheck",
"version": "0.2.11",
"version": "0.2.12",
"description": "mastercheck",

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