We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 106748e commit e83603aCopy full SHA for e83603a
index.js
@@ -1,11 +1,13 @@
1
import * as tty from "tty"
2
3
-const env = process.env || {}
4
-const argv = process.argv || []
+const proc = typeof process === "undefined" ? {} : process
+
5
+const env = proc.env || {}
6
+const argv = proc.argv || []
7
8
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color")
9
const isForced = "FORCE_COLOR" in env || argv.includes("--color")
-const isWindows = process.platform === "win32"
10
+const isWindows = proc.platform === "win32"
11
const isDumbTerminal = env.TERM === "dumb"
12
13
const isCompatibleTerminal =
0 commit comments