ternarify
This commit is contained in:
parent
eb7a5db36a
commit
99614e760f
1 changed files with 1 additions and 5 deletions
6
index.js
6
index.js
|
|
@ -8,11 +8,7 @@ var defineProps = Object.defineProperties;
|
|||
|
||||
function Chalk(options) {
|
||||
// detect mode if not set manually
|
||||
if (!options || options.enabled === undefined) {
|
||||
this.enabled = supportsColor;
|
||||
} else {
|
||||
this.enabled = options.enabled;
|
||||
}
|
||||
this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;
|
||||
}
|
||||
|
||||
// use bright blue on Windows as the normal blue color is illegible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue