-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(environment): remove IS_NODE_ENV and delete dead code
- Loading branch information
1 parent
8a506bc
commit 90984b3
Showing
12 changed files
with
81 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
export const IS_NODE_ENV = | ||
typeof global !== 'undefined' && | ||
typeof require === 'function' && | ||
!!global.process && | ||
typeof __filename === 'string' && | ||
(!(global as any as Window).origin || typeof (global as any as Window).origin !== 'string'); | ||
|
||
export const OS_PLATFORM = IS_NODE_ENV ? process.platform : ''; | ||
|
||
export const IS_WINDOWS_ENV = OS_PLATFORM === 'win32'; | ||
export const IS_WINDOWS_ENV = process.platform === 'win32'; | ||
|
||
export const IS_CASE_SENSITIVE_FILE_NAMES = !IS_WINDOWS_ENV; | ||
|
||
export const IS_BROWSER_ENV = | ||
typeof location !== 'undefined' && typeof navigator !== 'undefined' && typeof XMLHttpRequest !== 'undefined'; | ||
|
||
export const IS_WEB_WORKER_ENV = | ||
IS_BROWSER_ENV && typeof self !== 'undefined' && typeof (self as any).importScripts === 'function'; | ||
|
||
export const HAS_WEB_WORKER = IS_BROWSER_ENV && typeof Worker === 'function'; | ||
|
||
export const IS_FETCH_ENV = typeof fetch === 'function'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.