properties-file 3.2.25 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,7 @@
5
5
  * @param escapeUnicode - Escape unicode characters into ISO-8859-1 compatible encoding?
6
6
  *
7
7
  * @return The escaped key.
8
- */var escapeKey=exports.escapeKey=function(a){var b=!!(1<arguments.length&&arguments[1]!==void 0)&&arguments[1];return escapeContent(a,!0,b)},escapeValue=exports.escapeValue=function(a){var b=!!(1<arguments.length&&arguments[1]!==void 0)&&arguments[1];return escapeContent(a,!1,b)},escapeContent=function(a,b,c){return(// By using a regular expression we avoid iterating through all characters and improve performance.
9
- a.replace(/[\s!#:=\\]|[^\u0020-\u007E]/g,function(d){switch(d){case" ":// Escape space if required, or if it's the first character.
10
- return b||d===a[0]?"\\ ":" ";case"\\":// Backslash.
11
- return"\\\\";case"\f":// Formfeed.
12
- return"\\f";case"\n":// Newline.
13
- return"\\n";case"\r":// Carriage return.
14
- return"\\r";case"\t":// Tab.
15
- return"\\t";case"=":case":":case"#":case"!":// =, :, # and !.
16
- return"\\".concat(d);default:{if(c){var e=d.codePointAt(0);// Can never be `undefined`.
17
- if(32>e||126<e)// Any character that is not in the range of ASCII printable characters.
18
- return"\\u".concat(e.toString(16).padStart(4,"0"))}return d}}}))};/**
8
+ */var escapeKey=exports.escapeKey=function(a){var b=!!(1<arguments.length&&arguments[1]!==void 0)&&arguments[1];return escapeContent(a,!0,b)},escapeValue=exports.escapeValue=function(a){var b=!!(1<arguments.length&&arguments[1]!==void 0)&&arguments[1];return escapeContent(a,!1,b)},escapeContent=function(a,b,c){return a.replace(new RegExp("[\\s!#:=\\\\".concat(c?"\\u0000-\\u001F\\u007F-\\uFFFF":"","]"),"g"),function(a){return" "===a?b?"\\ ":" ":"\\"===a?"\\\\":"\f"===a?"\\f":"\n"===a?"\\n":"\r"===a?"\\r":"\t"===a?"\\t":"="===a||":"===a||"#"===a||"!"===a?"\\".concat(a):"\\u".concat(a.codePointAt(0).toString(16).padStart(4,"0"))})};/**
19
9
  * Escape property value.
20
10
  *
21
11
  * @param unescapedValue - Property value to be escaped.
@@ -29,5 +19,5 @@ return"\\u".concat(e.toString(16).padStart(4,"0"))}return d}}}))};/**
29
19
  * @param escapeSpace - Escape spaces?
30
20
  * @param escapeUnicode - Escape unicode characters into ISO-8859-1 compatible encoding?
31
21
  *
32
- * @returns The unescaped content.
22
+ * @returns The escaped content.
33
23
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "properties-file",
3
- "version": "3.2.25",
3
+ "version": "3.3.0",
4
4
  "description": ".properties file parser, editor, formatter and Webpack loader.",
5
5
  "keywords": [
6
6
  ".properties",
@@ -69,12 +69,12 @@
69
69
  "@babel/preset-typescript": "7.23.0",
70
70
  "@release-it/conventional-changelog": "7.0.2",
71
71
  "@types/jest": "29.5.5",
72
- "@typescript-eslint/eslint-plugin": "6.7.4",
73
- "@typescript-eslint/parser": "6.7.4",
72
+ "@typescript-eslint/eslint-plugin": "6.7.5",
73
+ "@typescript-eslint/parser": "6.7.5",
74
74
  "babel-preset-minify": "^0.5.2",
75
75
  "check-node-version": "^4.2.1",
76
76
  "dotenv-cli": "7.3.0",
77
- "eslint": "8.50.0",
77
+ "eslint": "8.51.0",
78
78
  "eslint-config-prettier": "9.0.0",
79
79
  "eslint-import-resolver-node": "0.3.9",
80
80
  "eslint-import-resolver-typescript": "3.6.1",