ric-utils-misc
Advanced tools
Comparing version 1.0.56 to 1.0.57
@@ -24,4 +24,5 @@ /* | ||
const keys = path.split('.'); | ||
let longKey; | ||
for (let i = 0; i < keys.length; i++) { | ||
const key = keys[i]; | ||
const key = longKey ? `${longKey}.${keys[i]}` : keys[i]; | ||
@@ -33,5 +34,11 @@ if(typeof object === 'number' && isFinite(key)) { | ||
if (!object || !object.hasOwnProperty(key)) { | ||
object = undefined; | ||
break; | ||
if (i === keys.length - 1) { | ||
object = undefined; | ||
break; | ||
} else { | ||
longKey = longKey ? `${longKey}.${key}` : key; | ||
continue; | ||
} | ||
} | ||
longKey = undefined; | ||
object = object[key]; | ||
@@ -38,0 +45,0 @@ } |
{ | ||
"name": "ric-utils-misc", | ||
"version": "1.0.56", | ||
"version": "1.0.57", | ||
"description": "Miscellaneous utility functions", | ||
@@ -5,0 +5,0 @@ "main": "index", |
45070
1660