UNPKG

lib0

Version:

isomorphic utility functions

21 lines • 805 B
/** * Environment detection primitives shared by `environment.js` and `storage.js`. * * Internal module (not exported in `package.json`) — it exists so that `storage.js` can check * `isBrowser` without importing `environment.js`, which imports `storage.js` (circular import). */ export const isNode: boolean; /** * True iff this script is running in deno * @type {boolean} */ export const isDeno: boolean; export const globalScope: any; /** * True iff this script is running in a browser-family environment — either a DOM main * thread (`window` + `document`) or a WebWorker / ServiceWorker (a `WorkerGlobalScope`, * which has `btoa`/`atob`/`fetch` but no DOM). Excludes Node and Deno. * @type {boolean} */ export const isBrowser: boolean; //# sourceMappingURL=environment.common.d.ts.map