Skip to content

Commit defc56a

Browse files
authored
Update replacement to encompass all nested dots in the key (#19)
* fix: update replacement to encompass all nested dots in the key * chore(release): 2.4.1
1 parent 9d25aeb commit defc56a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/deeks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function processArrayKeys(subArray, currentKeyPath, options) {
8787

8888
function escapeNestedDotsIfSpecified(key, options) {
8989
if (options.escapeNestedDots) {
90-
return key.replace('.', '\\.');
90+
return key.replace(/\./g, '\\.');
9191
}
9292
return key;
9393
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deeks",
3-
"version": "2.4.0",
3+
"version": "2.4.1",
44
"description": "Retrieve all keys and nested keys from objects and arrays of objects.",
55
"main": "lib/deeks.js",
66
"scripts": {

0 commit comments

Comments
 (0)