jbilcke-hf's picture
jbilcke-hf HF staff
🍿
1f122c3
raw
history blame
271 Bytes
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
const isWebWorker =
typeof self === "object" && self.constructor && self.constructor.name === "DedicatedWorkerGlobalScope";
export const isBackend = !isBrowser && !isWebWorker;