dottie
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -75,2 +75,3 @@ (function(undefined) { | ||
var pieces = Array.isArray(path) ? path : path.split('.'), current = object, piece, length = pieces.length; | ||
if (pieces[0] === '__proto__') return; | ||
@@ -144,2 +145,5 @@ if (typeof current !== 'object') { | ||
pieces = key.split(options.delimiter); | ||
if (pieces[0] === '__proto__') break; | ||
piecesLength = pieces.length; | ||
@@ -146,0 +150,0 @@ current = transformed; |
{ | ||
"name": "dottie", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"devDependencies": { | ||
@@ -5,0 +5,0 @@ "chai": "^4.2.0", |
@@ -35,2 +35,3 @@ [![Build Status](https://travis-ci.org/mickhansen/dottie.js.svg?branch=master)](https://travis-ci.org/mickhansen/dottie.js) | ||
### Set value | ||
Sets nested value, creates nested structure if needed | ||
@@ -46,2 +47,4 @@ | ||
If you accept arbitrary/user-defined paths to `set` you should call `Object.preventExtensions(values)` first to guard against potential pollution. | ||
### Transform object | ||
@@ -48,0 +51,0 @@ Transform object from keys with dottie notation to nested objects |
10496
186
113