1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-02 20:00:05 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

9
node_modules/tr46/index.js generated vendored
View File

@@ -6,7 +6,7 @@ const mappingTable = require("./lib/mappingTable.json");
const { STATUS_MAPPING } = require("./lib/statusMapping.js");
function containsNonASCII(str) {
return /[^\x00-\x7F]/.test(str);
return /[^\x00-\x7F]/u.test(str);
}
function findStatus(val, { useSTD3ASCIIRules }) {
@@ -204,10 +204,11 @@ function processing(domainName, options) {
if (error) {
continue;
}
const validation = validateLabel(label, Object.assign({}, options, {
const validation = validateLabel(label, {
...options,
processingOption: curProcessing,
checkBidi: options.checkBidi && isBidi
}));
});
if (!validation) {
error = true;
}
@@ -242,7 +243,7 @@ function toASCII(domainName, {
labels = labels.map(l => {
if (containsNonASCII(l)) {
try {
return "xn--" + punycode.encode(l);
return `xn--${punycode.encode(l)}`;
} catch (e) {
result.error = true;
}