util: change inspect depth default by BridgeAR · Pull Request #17907 · nodejs/node (original) (raw)
@silverwind I do not see a big difference between 5 and unlimited. Most entries are not that deeply nested and if they are, you likely want to see everything. To prevent huge diffs, the max array entries option is way more efficient as this would otherwise be more difficult to handle.
About the complexity: I am fine with showing everything as a new default for console.* and this would remove the complexity again. But it would be a more significant change and I tried to minimize the breaking change.
For the repl it might be best to stay with the current default though. The reason is that some modules like fs
have lots of nested elements and it would be be verbose otherwise.