properties-file
Advanced tools
Comparing version 3.2.23 to 3.2.24
@@ -10,5 +10,8 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.unescapeContent=void 0;/** | ||
* This exception is thrown if malformed escaped unicode characters are present. | ||
*/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. | ||
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). | ||
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. | ||
b+=c;return b}; | ||
*/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. | ||
return"\f";case"n":// Newline. | ||
return"\n";case"r":// Carriage return. | ||
return"\r";case"t":// Tab. | ||
return"\t";case"u":{// Unicode character. | ||
var c=a.slice(2,6);if(!/[\da-f]{4}/i.test(c))// Code point can only be within Unicode's Multilingual Plane (BMP). | ||
throw new Error("malformed escaped unicode characters '\\u".concat(c,"'"));return String.fromCodePoint(Number.parseInt(c,16))}default:return b}})}; |
{ | ||
"name": "properties-file", | ||
"version": "3.2.23", | ||
"version": "3.2.24", | ||
"description": ".properties file parser, editor, formatter and Webpack loader.", | ||
@@ -72,4 +72,4 @@ "keywords": [ | ||
"@types/jest": "29.5.5", | ||
"@typescript-eslint/eslint-plugin": "6.7.3", | ||
"@typescript-eslint/parser": "6.7.3", | ||
"@typescript-eslint/eslint-plugin": "6.7.4", | ||
"@typescript-eslint/parser": "6.7.4", | ||
"babel-preset-minify": "^0.5.2", | ||
@@ -76,0 +76,0 @@ "check-node-version": "^4.2.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
690
64886