enso/app/gui2/shared/util/detect.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
324 B
TypeScript
Raw Normal View History

// Environment detection
// Normally `global` is node-specific, but a workaround requires `global` to also exist
// in the browser for Amplify to work.
export const isNode =
typeof global !== 'undefined' && (global as any)[Symbol.toStringTag] === 'global'
export const isDevMode = process.env.NODE_ENV === 'development'