summaryrefslogtreecommitdiff
path: root/lib/internal/util/inspect.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-04-05 22:18:16 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2019-04-10 17:59:14 +0200
commitc9fece38c8dc872303fd0f5d6bf0ffc44bea7f4f (patch)
tree173068b5a4f1dc81ad17b55d7b26300658ce8f0a /lib/internal/util/inspect.js
parent892c51f330f99b7eb57481e183df61530a9c5956 (diff)
downloadandroid-node-v8-c9fece38c8dc872303fd0f5d6bf0ffc44bea7f4f.tar.gz
android-node-v8-c9fece38c8dc872303fd0f5d6bf0ffc44bea7f4f.tar.bz2
android-node-v8-c9fece38c8dc872303fd0f5d6bf0ffc44bea7f4f.zip
util: change inspect compact and breakLength default
This changes the `compact` default from `true` to `3`. That mode changes arrays to be grouped together, it alignes multiple small entries on a single line in similar to `compact` true but only for the most inner three depth levels and the closing brackets are always on the same indentation as the openeing of the object instead of at the same line as another property. Big strings will be naturally broken into multiple lines instead of having one huge line that is not well readable. The output size mainly stays the same that way while it will be smaller in case of big arrays. Increasing the `breakLength` to 80 adjusts for most terminals that support at least 80 characters in a single line and improves the general output that way. A lot of calculations use the `breakLength` to determine the concrete behavior. PR-URL: https://github.com/nodejs/node/pull/27109 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'lib/internal/util/inspect.js')
-rw-r--r--lib/internal/util/inspect.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js
index 5439c27d25..a31ee5b8eb 100644
--- a/lib/internal/util/inspect.js
+++ b/lib/internal/util/inspect.js
@@ -95,8 +95,8 @@ const inspectDefaultOptions = Object.seal({
customInspect: true,
showProxy: false,
maxArrayLength: 100,
- breakLength: 60,
- compact: true,
+ breakLength: 80,
+ compact: 3,
sorted: false,
getters: false
});