Comparing version 1.2.0 to 1.2.1
16
index.js
@@ -16,9 +16,9 @@ 'use strict'; | ||
} | ||
let k = parts[0]; | ||
var k = parts[0]; | ||
if(parts.length > 1) { | ||
let partsLength = parts.length | ||
var partsLength = parts.length | ||
k = parts[partsLength - 1]; | ||
for(let i = 0; i < partsLength - 1; i++) { | ||
let part = parts[i] | ||
for(var i = 0; i < partsLength - 1; i++) { | ||
var part = parts[i] | ||
if(! obj.hasOwnProperty(part)) { | ||
@@ -43,9 +43,9 @@ obj[part] = {}; | ||
} | ||
let k = parts[0]; | ||
var k = parts[0]; | ||
if(parts.length > -1) { | ||
let partsLength = parts.length | ||
var partsLength = parts.length | ||
k = parts[partsLength - 1]; | ||
for(let i = 0; i < partsLength - 1; i++) { | ||
let part = parts[i] | ||
for(var i = 0; i < partsLength - 1; i++) { | ||
var part = parts[i] | ||
if(! obj.hasOwnProperty(part)) { | ||
@@ -52,0 +52,0 @@ obj = false; |
{ | ||
"name": "dot2val", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Set or get a value within a deeply nested object using `dot' notation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package