mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-04 12:40:05 +02:00
update packages to latest version
This commit is contained in:
11
node_modules/data-urls/lib/utils.js
generated
vendored
11
node_modules/data-urls/lib/utils.js
generated
vendored
@@ -1,17 +1,12 @@
|
||||
"use strict";
|
||||
const { percentDecode } = require("whatwg-url");
|
||||
const { atob } = require("abab");
|
||||
|
||||
exports.stripLeadingAndTrailingASCIIWhitespace = string => {
|
||||
return string.replace(/^[ \t\n\f\r]+/, "").replace(/[ \t\n\f\r]+$/, "");
|
||||
};
|
||||
|
||||
exports.stringPercentDecode = input => {
|
||||
return percentDecode(Buffer.from(input, "utf-8"));
|
||||
return string.replace(/^[ \t\n\f\r]+/u, "").replace(/[ \t\n\f\r]+$/u, "");
|
||||
};
|
||||
|
||||
exports.isomorphicDecode = input => {
|
||||
return input.toString("binary");
|
||||
return Array.from(input, byte => String.fromCodePoint(byte)).join("");
|
||||
};
|
||||
|
||||
exports.forgivingBase64Decode = data => {
|
||||
@@ -19,5 +14,5 @@ exports.forgivingBase64Decode = data => {
|
||||
if (asString === null) {
|
||||
return null;
|
||||
}
|
||||
return Buffer.from(asString, "binary");
|
||||
return Uint8Array.from(asString, c => c.codePointAt(0));
|
||||
};
|
||||
|
Reference in New Issue
Block a user