Skip to content

Commit

Permalink
remove mention of preventExtensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhansen committed Jun 8, 2023
1 parent e0c8bae commit b183fff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ dottie.set(values, 'some.nested.object', someValue, {
});
```

If you accept arbitrary/user-defined paths to `set` you should call `Object.preventExtensions(values)` first to guard against potential pollution.

### Transform object
Transform object from keys with dottie notation to nested objects

Expand Down
2 changes: 1 addition & 1 deletion dottie.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
, piecesLength
, piece
, current
, transformed = {}
, transformed = Object.preventExtensions({})
, key
, keys = Object.keys(object)
, length = keys.length
Expand Down

0 comments on commit b183fff

Please sign in to comment.