ente/packages/shared/platform/index.ts

14 lines
273 B
TypeScript
Raw Normal View History

2023-11-10 09:38:10 +00:00
import isElectron from 'is-electron';
2023-11-02 05:26:51 +00:00
export function runningInBrowser() {
return typeof window !== 'undefined';
}
2023-11-10 09:38:10 +00:00
export function runningInWorker() {
return typeof importScripts === 'function';
}
export function runningInElectron() {
return isElectron();
}