Skip to content

Commit

Permalink
util: change items unknown style
Browse files Browse the repository at this point in the history
We mainly use <> to visualize special information that is not
directly visible as property.

PR-URL: #20792
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
  • Loading branch information
BridgeAR committed May 20, 2018
1 parent 0271b0f commit e270ae9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,14 +610,14 @@ function formatValue(ctx, value, recurseTimes, ln) {
if (ctx.showHidden) {
formatter = formatWeakSet;
} else {
extra = '[items unknown]';
extra = '<items unknown>';
}
} else if (isWeakMap(value)) {
braces[0] = `${getPrefix(constructor, tag)}{`;
if (ctx.showHidden) {
formatter = formatWeakMap;
} else {
extra = '[items unknown]';
extra = '<items unknown>';
}
} else if (types.isModuleNamespaceObject(value)) {
braces[0] = `[${tag}] {`;
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ util.inspect(process);
assert.strictEqual(out, expect);

out = util.inspect(weakMap);
expect = 'WeakMap { [items unknown] }';
expect = 'WeakMap { <items unknown> }';
assert.strictEqual(out, expect);

out = util.inspect(weakMap, { maxArrayLength: 0, showHidden: true });
Expand All @@ -1334,7 +1334,7 @@ util.inspect(process);
assert.strictEqual(out, expect);

out = util.inspect(weakSet);
expect = 'WeakSet { [items unknown] }';
expect = 'WeakSet { <items unknown> }';
assert.strictEqual(out, expect);

out = util.inspect(weakSet, { maxArrayLength: -2, showHidden: true });
Expand Down

0 comments on commit e270ae9

Please sign in to comment.