Skip to content

Commit

Permalink
Update replacement to encompass all nested dots in the key (#19)
Browse files Browse the repository at this point in the history
* fix: update replacement to encompass all nested dots in the key

* chore(release): 2.4.1
  • Loading branch information
mrodrig authored May 27, 2021
1 parent 9d25aeb commit defc56a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/deeks.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function processArrayKeys(subArray, currentKeyPath, options) {

function escapeNestedDotsIfSpecified(key, options) {
if (options.escapeNestedDots) {
return key.replace('.', '\\.');
return key.replace(/\./g, '\\.');
}
return key;
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deeks",
"version": "2.4.0",
"version": "2.4.1",
"description": "Retrieve all keys and nested keys from objects and arrays of objects.",
"main": "lib/deeks.js",
"scripts": {
Expand Down

0 comments on commit defc56a

Please sign in to comment.