Socket
Socket
Sign inDemoInstall

dottie

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.2.0

7

dottie.js

@@ -110,6 +110,9 @@ (function(undefined) {

}
current = current[piece];
if (current === null) {
delete transformed[key];
break;
}
}
} else {
transformed[key] = transformed[key]; // Ensure that properties exist on the object, not just the prototype
}

@@ -116,0 +119,0 @@ }

{
"name": "dottie",
"version": "0.1.0",
"version": "0.2.0",
"devDependencies": {

@@ -5,0 +5,0 @@ "expect.js": "~0.2.0",

@@ -88,2 +88,17 @@ var expect = require("expect.js"),

});
it("should be able to handle null valued properties, not assigning nested level objects", function() {
var values = {
'section.id': 20,
'section.layout': null,
'section.layout.id': null,
'section.layout.name': null
};
var transformed = dottie.transform(values);
expect(transformed.section.layout).to.be(null);
expect(transformed['section.layout.id']).to.be(undefined);
expect(transformed['section.layout.name']).to.be(undefined);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc