mirror of
https://github.com/flynx/colors.js.git
synced 2025-10-28 18:40:09 +00:00
replace ternary with if/else
This commit is contained in:
parent
32906a23ad
commit
7f146faff3
@ -105,7 +105,11 @@ function applyStyle() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
var str = args.map(function(arg) {
|
||||
return arg.constructor === String ? arg : util.inspect(arg);
|
||||
if (arg.constructor === String) {
|
||||
return arg;
|
||||
} else {
|
||||
return util.inspect(arg);
|
||||
}
|
||||
}).join(' ');
|
||||
|
||||
if (!colors.enabled || !str) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user