From e270ae9f010db42290c2df733383cfb7dcfcd697 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We mainly use <> to visualize special information that is not directly visible as property. PR-URL: https://github.com/nodejs/node/pull/20792 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Michaƫl Zasso Reviewed-By: Daniel Bevenius Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Gus Caplan --- 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 776fcdb0d39653..46ae1724a7c0fb 100644 --- a/lib/util.js +++ b/lib/util.js @@ -610,14 +610,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 if (types.isModuleNamespaceObject(value)) { braces[0] = `[${tag}] {`; diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index e3122d1b81e72b..b9ed02ddc4a69e 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -1310,7 +1310,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 }); @@ -1334,7 +1334,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 });