Skip to content

escape() #83

@kakserpom

Description

@kakserpom

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch dot-prop@6.0.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/dot-prop/index.js b/node_modules/dot-prop/index.js
index aa9c5bb..57a49b5 100644
--- a/node_modules/dot-prop/index.js
+++ b/node_modules/dot-prop/index.js
@@ -134,5 +134,9 @@ module.exports = {
 		}
 
 		return true;
+	},
+
+	escape(prop) {
+		return prop.replace(/\./g, '\\.')
 	}
 };

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions