From 855e342c9e26ab3d7232506cc42c240b7d800bf1 Mon Sep 17 00:00:00 2001 From: DABH Date: Fri, 4 May 2018 17:53:43 -0700 Subject: [PATCH] arg is a String object not a string literal (fixes #226) --- lib/colors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/colors.js b/lib/colors.js index 0b97172..db4d851 100644 --- a/lib/colors.js +++ b/lib/colors.js @@ -105,7 +105,7 @@ function applyStyle() { var args = Array.prototype.slice.call(arguments); var str = args.map(function(arg) { - return typeof arg === 'object' ? util.inspect(arg) : arg; + return arg.constructor === String ? arg : util.inspect(arg); }).join(' '); if (!colors.enabled || !str) {