Commit c3243de
committed
util: special handle
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>maxArrayLength while grouping arrays1 parent a5fdedb commit c3243deCopy full SHA for c3243de
File tree
Expand file treeCollapse file tree
2 files changed
+16
-7
lines changedOpen diff view settings
Filter options
- lib/internal/util
- test/parallel
Expand file treeCollapse file tree
2 files changed
+16
-7
lines changedOpen diff view settings
Collapse file
lib/internal/util/inspect.js
Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js+13-5Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
946 | 946 | |
947 | 947 | |
948 | 948 | |
| 949 | + |
| 950 | + |
| 951 | + |
| 952 | + |
| 953 | + |
949 | 954 | |
950 | | - |
| 955 | + |
951 | 956 | |
952 | 957 | |
953 | 958 | |
954 | | - |
| 959 | + |
955 | 960 | |
956 | 961 | |
957 | 962 | |
| ||
979 | 984 | |
980 | 985 | |
981 | 986 | |
982 | | - |
| 987 | + |
983 | 988 | |
984 | 989 | |
985 | 990 | |
| ||
1003 | 1008 | |
1004 | 1009 | |
1005 | 1010 | |
1006 | | - |
| 1011 | + |
1007 | 1012 | |
1008 | 1013 | |
1009 | 1014 | |
1010 | 1015 | |
1011 | 1016 | |
1012 | 1017 | |
1013 | | - |
| 1018 | + |
1014 | 1019 | |
1015 | 1020 | |
1016 | 1021 | |
1017 | 1022 | |
1018 | 1023 | |
1019 | 1024 | |
| 1025 | + |
| 1026 | + |
| 1027 | + |
1020 | 1028 | |
1021 | 1029 | |
1022 | 1030 | |
|
Collapse file
test/parallel/test-util-inspect.js
Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2175 | 2175 | |
2176 | 2176 | |
2177 | 2177 | |
2178 | | - |
| 2178 | + |
2179 | 2179 | |
2180 | 2180 | |
2181 | 2181 | |
| ||
2224 | 2224 | |
2225 | 2225 | |
2226 | 2226 | |
2227 | | - |
| 2227 | + |
| 2228 | + |
2228 | 2229 | |
2229 | 2230 | |
2230 | 2231 | |
|
0 commit comments