From 7f146faff3e1b24a845587c07745b9ea0b864f62 Mon Sep 17 00:00:00 2001 From: DABH Date: Fri, 4 May 2018 18:18:27 -0700 Subject: [PATCH] replace ternary with if/else --- lib/colors.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/colors.js b/lib/colors.js index db4d851..7022a17 100644 --- a/lib/colors.js +++ b/lib/colors.js @@ -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) {