Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replace ternary with if/else
  • Loading branch information
DABH committed May 5, 2018
1 parent 32906a2 commit 7f146fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/colors.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 7f146fa

Please sign in to comment.