browser-or-node
Version:
Check in which environment the code is running - browser/node.js/webworker/jsdom/deno
10 lines (8 loc) • 320 B
TypeScript
declare const isBrowser: boolean;
declare const isNode: boolean;
declare const isWebWorker: boolean;
declare const isJsDom: boolean;
declare const isDeno: boolean;
/** @see {@link https://bun.sh/guides/util/detect-bun} */
declare const isBun: boolean;
export { isBrowser, isBun, isDeno, isJsDom, isNode, isWebWorker };