util: special handle `maxArrayLength` while grouping arrays · nodejs/node@c3243de · GitHub
Skip to content

Commit c3243de

Browse files
committed
util: special handle maxArrayLength while grouping arrays
This makes sure that large arrays with lots of small entries ignore the `... n more item(s)` part since it often resulted in output that users did not expect. Now that part is printed on a separate line to indicate extra entries. PR-URL: #28059 Refs: #27690 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent a5fdedb commit c3243de

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

lib/internal/util/inspect.js

Lines changed: 13 additions & 5 deletions

test/parallel/test-util-inspect.js

Lines changed: 3 additions & 2 deletions

0 commit comments

Comments
 (0)