From 37526a5ae869a075d65cd72e4c8ffa40b9736292 Mon Sep 17 00:00:00 2001 From: Roman Reiss Date: Mon, 24 Sep 2018 19:45:05 +0200 Subject: [PATCH] util: change inspect's default depth from 2 to 4 When dealing with somewhat deep objects, the default depath of 2 is often a hindrance when using the console to log said objects. This changes the default depth to a more reasonable 4. PR-URL: https://github.com/nodejs/node/pull/23062 --- doc/api/util.md | 5 +++- lib/internal/util/inspect.js | 2 +- test/parallel/test-util-inspect-proxy.js | 13 +++++---- test/parallel/test-util-inspect.js | 36 +++++++++++++----------- 4 files changed, 32 insertions(+), 24 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index 29ba65b760346e..87e4ff4ec2baa8 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -360,6 +360,9 @@ stream.write('With ES6');