Files
xLog/src/lib/constants.ts
T
2022-05-16 14:13:44 +08:00

6 lines
180 B
TypeScript

export const IS_BROWSER = typeof document !== "undefined"
export const IS_PROD = IS_BROWSER
? !location.hostname.endsWith("localhost")
: process.env.NODE_ENV === "production"