From 4a56d609bbea1ad531340e35459ea1d65a6b8085 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 17 May 2018 00:08:50 +0200 Subject: [PATCH] util: change items unknown style We mainly use <> to visualize special information that is not directly visible as property. --- lib/util.js | 4 ++-- test/parallel/test-util-inspect.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/util.js b/lib/util.js index 45d98de194c836..df8d5e238db1d5 100644 --- a/lib/util.js +++ b/lib/util.js @@ -629,14 +629,14 @@ function formatValue(ctx, value, recurseTimes, ln) { if (ctx.showHidden) { formatter = formatWeakSet; } else { - extra = '[items unknown]'; + extra = ''; } } else if (isWeakMap(value)) { braces[0] = `${getPrefix(constructor, tag)}{`; if (ctx.showHidden) { formatter = formatWeakMap; } else { - extra = '[items unknown]'; + extra = ''; } } else { // Check boxed primitives other than string with valueOf() diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 2b8e14e45f64e6..7402a57a4a6d59 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1361,7 +1361,7 @@ util.inspect(process); assert.strictEqual(out, expect); out = util.inspect(weakMap); - expect = 'WeakMap { [items unknown] }'; + expect = 'WeakMap { }'; assert.strictEqual(out, expect); out = util.inspect(weakMap, { maxArrayLength: 0, showHidden: true }); @@ -1385,7 +1385,7 @@ util.inspect(process); assert.strictEqual(out, expect); out = util.inspect(weakSet); - expect = 'WeakSet { [items unknown] }'; + expect = 'WeakSet { }'; assert.strictEqual(out, expect); out = util.inspect(weakSet, { maxArrayLength: -2, showHidden: true });