mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-03-09 20:34:16 +00:00
18 lines
399 B
JavaScript
18 lines
399 B
JavaScript
import { Buffer } from "https://esm.sh/buffer@6.0.3?bundle";
|
|
|
|
const globalScope = typeof globalThis !== "undefined" ? globalThis : window;
|
|
|
|
if (globalScope && !globalScope.Buffer) {
|
|
globalScope.Buffer = Buffer;
|
|
}
|
|
|
|
if (globalScope && !globalScope.global) {
|
|
globalScope.global = globalScope;
|
|
}
|
|
|
|
if (globalScope && !globalScope.process) {
|
|
globalScope.process = { env: {} };
|
|
}
|
|
|
|
export { Buffer };
|