mirror of
https://github.com/flynx/colors.js.git
synced 2025-11-01 20:40:14 +00:00
better way to call updated supportsColor
This commit is contained in:
parent
be9b77f96c
commit
1d7180a8a1
@ -36,10 +36,10 @@ colors.themes = {};
|
|||||||
var ansiStyles = colors.styles = require('./styles');
|
var ansiStyles = colors.styles = require('./styles');
|
||||||
var defineProps = Object.defineProperties;
|
var defineProps = Object.defineProperties;
|
||||||
|
|
||||||
colors.supportsColor = require('./system/supports-colors');
|
colors.supportsColor = require('./system/supports-colors').supportsColor;
|
||||||
|
|
||||||
if (typeof colors.enabled === "undefined") {
|
if (typeof colors.enabled === "undefined") {
|
||||||
colors.enabled = colors.supportsColor;
|
colors.enabled = colors.supportsColor() !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
colors.stripColors = colors.strip = function(str){
|
colors.stripColors = colors.strip = function(str){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user