Files
bitvid/dist/js/bufferPolyfill.js
T
2026-01-30 17:09:51 -05:00

18 lines
411 B
JavaScript

import { Buffer } from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
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 };