diff options
Diffstat (limited to 'lib/internal/streams/buffer_list.js')
-rw-r--r-- | lib/internal/streams/buffer_list.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/internal/streams/buffer_list.js b/lib/internal/streams/buffer_list.js index a72bf37a31..aa254309a0 100644 --- a/lib/internal/streams/buffer_list.js +++ b/lib/internal/streams/buffer_list.js @@ -158,8 +158,14 @@ module.exports = class BufferList { return ret; } - [inspect.custom]() { - const obj = inspect({ length: this.length }); - return `${this.constructor.name} ${obj}`; + // Make sure the linked list only shows the minimal necessary information. + [inspect.custom](_, options) { + return inspect(this, { + ...options, + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + }); } }; |