forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntimeEnvironment.ts
More file actions
30 lines (24 loc) · 797 Bytes
/
Copy pathruntimeEnvironment.ts
File metadata and controls
30 lines (24 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export const isDevelopmentEnvironment = (): boolean => {
try {
return process.env.NODE_ENV === 'development';
// eslint-disable-next-line no-empty
} catch (err) {}
// TODO: add support for import.meta.env.DEV that is being used by vite
return false;
};
export const isTestEnvironment = (): boolean => {
try {
return process.env.NODE_ENV === 'test';
// eslint-disable-next-line no-empty
} catch (err) {}
// TODO: add support for import.meta.env.DEV that is being used by vite
return false;
};
export const isProductionEnvironment = (): boolean => {
try {
return process.env.NODE_ENV === 'production';
// eslint-disable-next-line no-empty
} catch (err) {}
// TODO: add support for import.meta.env.DEV that is being used by vite
return false;
};