properties-file 3.2.23 → 3.2.24

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.
@@ -7,7 +7,10 @@
7
7
  *
8
8
  * @throws {@link Error}
9
9
  * This exception is thrown if malformed escaped unicode characters are present.
10
- */var unescapeContent=exports.unescapeContent=function(a){for(var b="",c=a[0],d=0;d<a.length;d++,c=a[d])if("\\"===c){var e=a[d+1];switch(e){case"f":{b+="\f",d++;break}case"n":{b+="\n",d++;break}case"r":{b+="\r",d++;break}case"t":{b+="\t",d++;break}case"u":{// Unicode character.
11
- var f=a.slice(d+2,d+6);if(!/[\da-f]{4}/i.test(f))// Code point can only be within Unicode's Multilingual Plane (BMP).
12
- throw new Error("malformed escaped unicode characters '\\u".concat(f,"'"));b+=String.fromCodePoint(Number.parseInt(f,16)),d+=5;break}default:b+=e,d++}}else// When there is \, simply add the character.
13
- b+=c;return b};
10
+ */var unescapeContent=exports.unescapeContent=function(a){return a.replace(/\\[^u]|\\u.{4}/g,function(a){var b=a.charAt(1);switch(b){case"f":// Formfeed.
11
+ return"\f";case"n":// Newline.
12
+ return"\n";case"r":// Carriage return.
13
+ return"\r";case"t":// Tab.
14
+ return"\t";case"u":{// Unicode character.
15
+ var c=a.slice(2,6);if(!/[\da-f]{4}/i.test(c))// Code point can only be within Unicode's Multilingual Plane (BMP).
16
+ throw new Error("malformed escaped unicode characters '\\u".concat(c,"'"));return String.fromCodePoint(Number.parseInt(c,16))}default:return b}})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "properties-file",
3
- "version": "3.2.23",
3
+ "version": "3.2.24",
4
4
  "description": ".properties file parser, editor, formatter and Webpack loader.",
5
5
  "keywords": [
6
6
  ".properties",
@@ -69,8 +69,8 @@
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.3",
73
- "@typescript-eslint/parser": "6.7.3",
72
+ "@typescript-eslint/eslint-plugin": "6.7.4",
73
+ "@typescript-eslint/parser": "6.7.4",
74
74
  "babel-preset-minify": "^0.5.2",
75
75
  "check-node-version": "^4.2.1",
76
76
  "dotenv-cli": "7.3.0",