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

psl-core

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

psl-core - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

dist/bundle.js

47

dist/Helper.js

@@ -88,2 +88,5 @@ 'use strict';

var keyEnd = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ']';
var _this = this;
var separator = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '|';

@@ -114,11 +117,4 @@ var strict = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;

texts.forEach(function (text) {
if (strict) {
if (_lodash2.default.toUpper(item[key]) === _lodash2.default.toUpper(text)) found = true;
} else {
if (_lodash2.default.toUpper(item[key]).indexOf(_lodash2.default.toUpper(text)) !== -1) {
found = true;
}
}
if (_this.foundText(item[key], text, strict)) found = true;
});
return found;

@@ -129,11 +125,4 @@ });

collection = collection.filter(function (item) {
if (strict) {
if (_lodash2.default.toUpper(item[key]) === _lodash2.default.toUpper(text)) return true;
} else {
if (_lodash2.default.toUpper(item[key]).indexOf(_lodash2.default.toUpper(text)) !== -1) {
return true;
}
}
return false;
return _this.foundText(item[key], text, strict);
});

@@ -145,2 +134,28 @@ }

}
/**
* Check if a string contains a substring.
* If stric is true, both values must be equals.
* @param string
* @param search
* @param strict
* @return {boolean}
*/
}, {
key: 'foundText',
value: function foundText(string, search, strict) {
if (strict) {
if (_lodash2.default.toUpper(string) === _lodash2.default.toUpper(search)) return true;
} else {
var pos = _lodash2.default.toUpper(string).indexOf(_lodash2.default.toUpper(search));
if (pos !== -1) {
if (search === '') {
return _lodash2.default.toUpper(string) === _lodash2.default.toUpper(search);
} else return true;
}
}
return false;
}
}]);

@@ -147,0 +162,0 @@

{
"name": "psl-core",
"version": "1.0.8",
"version": "1.0.9",
"description": "Core Library",

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

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