Neah/node_modules/@buttercup/fetch/dist/index.browser.js
2025-04-24 19:10:05 +02:00

12 lines
371 B
JavaScript

const inWebWorker = typeof WorkerGlobalScope !== "undefined" &&
self instanceof WorkerGlobalScope;
const root = inWebWorker
? self
: typeof window !== "undefined"
? window
: globalThis;
export const fetch = root.fetch.bind(root);
export const Headers = root.Headers;
export const Request = root.Request;
export const Response = root.Response;