mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 21:41:53 +07:00
Fix dependencies: Add flag-icons, tailwind directives, and postcss config
This commit is contained in:
28
node_modules/entities/dist/esm/internal/decode-shared.js
generated
vendored
Normal file
28
node_modules/entities/dist/esm/internal/decode-shared.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Shared base64 decode helper for generated decode data.
|
||||
* Assumes global atob is available.
|
||||
*/
|
||||
export function decodeBase64(input) {
|
||||
const binary =
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
typeof atob === "function"
|
||||
? // Browser (and Node >=16)
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
atob(input)
|
||||
: // Older Node versions (<16)
|
||||
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
typeof Buffer.from === "function"
|
||||
? // eslint-disable-next-line n/no-unsupported-features/node-builtins
|
||||
Buffer.from(input, "base64").toString("binary")
|
||||
: // eslint-disable-next-line unicorn/no-new-buffer, n/no-deprecated-api
|
||||
new Buffer(input, "base64").toString("binary");
|
||||
const evenLength = binary.length & ~1; // Round down to even length
|
||||
const out = new Uint16Array(evenLength / 2);
|
||||
for (let index = 0, outIndex = 0; index < evenLength; index += 2) {
|
||||
const lo = binary.charCodeAt(index);
|
||||
const hi = binary.charCodeAt(index + 1);
|
||||
out[outIndex++] = lo | (hi << 8);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
//# sourceMappingURL=decode-shared.js.map
|
||||
Reference in New Issue
Block a user