13 lines
273 B
TypeScript
13 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();
|
|
}
|