Comparing version
@@ -1,6 +0,10 @@ | ||
const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env; | ||
let FORCE_COLOR, NODE_DISABLE_COLORS, TERM, isTTY=true; | ||
if (typeof process !== 'undefined') { | ||
({ FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env); | ||
isTTY = process.stdout.isTTY; | ||
} | ||
const $ = exports.$ = { | ||
enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && ( | ||
FORCE_COLOR != null && FORCE_COLOR !== '0' || process.stdout.isTTY | ||
FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY | ||
) | ||
@@ -7,0 +11,0 @@ } |
'use strict'; | ||
const { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env; | ||
let FORCE_COLOR, NODE_DISABLE_COLORS, TERM, isTTY=true; | ||
if (typeof process !== 'undefined') { | ||
({ FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env); | ||
isTTY = process.stdout.isTTY; | ||
} | ||
const $ = { | ||
enabled: !NODE_DISABLE_COLORS && TERM !== 'dumb' && ( | ||
FORCE_COLOR != null && FORCE_COLOR !== '0' || process.stdout.isTTY | ||
FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY | ||
), | ||
@@ -9,0 +13,0 @@ |
{ | ||
"name": "kleur", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"repository": "lukeed/kleur", | ||
@@ -5,0 +5,0 @@ "description": "The fastest Node.js library for formatting terminal text with ANSI colors~!", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
19640
2.27%375
4.46%