diff --git a/index.js b/index.js index 9e1a05f..af7ec69 100644 --- a/index.js +++ b/index.js @@ -1,9 +1,11 @@ import * as tty from "tty" -import { env, platform } from "process" +import process from "process" + +const env = process.env || {} const isDisabled = "NO_COLOR" in env const isForced = "FORCE_COLOR" in env -const isWindows = platform === "win32" +const isWindows = process.platform === "win32" const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && env.TERM !== "dumb"