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

eh-guid

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eh-guid - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

12

index.js

@@ -65,2 +65,11 @@ "use strict";

function unIsolateArrayOfStrings(data) {
for(var i = 0; i != data.length; i++) {
if(typeof data[i] === "string") {
data[i] = unIsolate(data[i]);
}
}
}
function unIsolateObject(keys, object) {

@@ -71,2 +80,5 @@ for(var key in object) {

}
else if(key in keys && (object[key] instanceof Array)) {
unIsolateArrayOfStrings(object[key]);
}
else {

@@ -73,0 +85,0 @@ if(object[key] instanceof Array) {

2

package.json
{
"name": "eh-guid",
"version": "0.3.0",
"version": "0.4.0",
"description": "EverHelper working with guid",

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

@@ -93,2 +93,17 @@ var

});
it("unisolate object which have field of array of strings", function() {
var obj = {
globalId: ["1-test", "1-guid"]
};
var g = new GlobalId({
userId: 1,
keys: ["globalId"]
});
g.unIsolate(obj);
var expected = {
globalId: ['test', 'guid']
};
obj.should.eql(expected);
});
});
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