From 4db10ed9ad41764eab40df714d761389bbaf6df3 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 22 Feb 2019 23:26:25 +0100 Subject: util: add compact depth mode This overloads the `compact` option from `util.inspect()`. If it's set to a number, it is going to align all most inner entries on the same lign if they adhere to the following: * The entries do not exceed the `breakLength` options value. * The entry is one of the local most inner levels up the the one provided in `compact`. PR-URL: https://github.com/nodejs/node/pull/26269 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen --- doc/api/util.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/api/util.md b/doc/api/util.md index d53e18b217..2826e0f1a6 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -388,6 +388,9 @@ stream.write('With ES6');