-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96863b3
commit 9a9bb38
Showing
2 changed files
with
9 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
const isWindows = | ||
navigator.platform && navigator.platform.toLowerCase() === 'win32'; | ||
const os = require('os'); | ||
|
||
const isMac = | ||
navigator.platform && navigator.platform.toUpperCase().indexOf('MAC') >= 0; | ||
const isWindows = os.platform() === 'win32'; | ||
const isMac = os.platform() === 'darwin'; | ||
const isLinux = os.platform() === 'linux'; | ||
|
||
export const isPlaywright = navigator.userAgent === 'playwright'; | ||
export const isPlaywright = false; | ||
|
||
export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = isWindows | ||
? 'windows' | ||
: isMac | ||
? 'mac' | ||
: 'linux'; | ||
: isLinux | ||
? 'linux' | ||
: 'unknown'; | ||
export const env: 'web' | 'mobile' | 'unknown' = 'unknown'; | ||
export const isBrowser = false; |