Unverified Commit 489e77c1 authored by Ruben Bridgewater's avatar Ruben Bridgewater
Browse files

util: add (typed) array length to the default output

Align the inspect output with the one used in the Chrome dev tools.
A recent survey outlined that most users prefer to see the number
of set and map entries. This should count as well for array sizes.
The size is only added to regular arrays in case the constructor is
not the default constructor.
Typed arrays always indicate their size.

PR-URL: https://github.com/nodejs/node/pull/31027


Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
parent b45eeee0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment