File size: 271 Bytes
1f122c3
 
 
 
 
 
1
2
3
4
5
6
7
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;