Comparing version
@@ -142,3 +142,9 @@ var path = require('path'); | ||
var tip_key = key_array.pop(); | ||
if (key_array.includes('__proto__') || key_array.includes('constructor') || key_array.includes('prototype')) { | ||
return; | ||
} | ||
var parent_path = key_array.join('.'); | ||
var parent_object = keypath(_this._object).valueForKeyPath(parent_path); | ||
@@ -168,3 +174,3 @@ | ||
if (indent !== 'auto') { | ||
if (indent && indent !== 'auto') { | ||
this._indent = parseInt(indent); | ||
@@ -171,0 +177,0 @@ } |
{ | ||
"name": "dot-json", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Easily edit a json file from the CLI or NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "lib/dot-json.js", |
37159
0.12%5
-16.67%1161
-0.34%