mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-29 11:00:11 +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 defineProps = Object.defineProperties;
|
||||
|
||||
colors.supportsColor = require('./system/supports-colors');
|
||||
colors.supportsColor = require('./system/supports-colors').supportsColor;
|
||||
|
||||
if (typeof colors.enabled === "undefined") {
|
||||
colors.enabled = colors.supportsColor;
|
||||
colors.enabled = colors.supportsColor() !== false;
|
||||
}
|
||||
|
||||
colors.stripColors = colors.strip = function(str){
|
||||
@ -184,4 +184,4 @@ for (var map in colors.maps) {
|
||||
})(map)
|
||||
}
|
||||
|
||||
defineProps(colors, init());
|
||||
defineProps(colors, init());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user