ente/packages/shared/platform/index.ts
2023-11-10 15:08:10 +05:30

14 lines
273 B
TypeScript

import isElectron from 'is-electron';
export function runningInBrowser() {
return typeof window !== 'undefined';
}
export function runningInWorker() {
return typeof importScripts === 'function';
}
export function runningInElectron() {
return isElectron();
}