Skip to content

Commit 7f146fa

Browse files
committed
replace ternary with if/else
1 parent 32906a2 commit 7f146fa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/colors.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ function applyStyle() {
105105
var args = Array.prototype.slice.call(arguments);
106106

107107
var str = args.map(function(arg) {
108-
return arg.constructor === String ? arg : util.inspect(arg);
108+
if (arg.constructor === String) {
109+
return arg;
110+
} else {
111+
return util.inspect(arg);
112+
}
109113
}).join(' ');
110114

111115
if (!colors.enabled || !str) {

0 commit comments

Comments
 (0)