Update checked-in dependencies
This commit is contained in:
parent
4b72bef651
commit
dbb232a3d8
1389 changed files with 209949 additions and 542 deletions
20
node_modules/data-urls/lib/utils.js
generated
vendored
Normal file
20
node_modules/data-urls/lib/utils.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
|
||||
exports.stripLeadingAndTrailingASCIIWhitespace = string => {
|
||||
return string.replace(/^[ \t\n\f\r]+/u, "").replace(/[ \t\n\f\r]+$/u, "");
|
||||
};
|
||||
|
||||
exports.isomorphicDecode = input => {
|
||||
return Array.from(input, byte => String.fromCodePoint(byte)).join("");
|
||||
};
|
||||
|
||||
exports.forgivingBase64Decode = data => {
|
||||
let asString;
|
||||
try {
|
||||
asString = atob(data);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Uint8Array.from(asString, c => c.codePointAt(0));
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue