Uh oh!
There was an error while loading. Please reload this page.
Commit a699808
committed
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: #31027
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>1 parent ffbf790 commit a699808
6 files changed
Lines changed: 71 additions & 75 deletions
File tree
- lib/internal/util
- test/parallel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
562 | 565 | | |
563 | 566 | | |
564 | 567 | | |
565 | | - | |
| 568 | + | |
566 | 569 | | |
567 | 570 | | |
568 | | - | |
| 571 | + | |
569 | 572 | | |
570 | | - | |
| 573 | + | |
571 | 574 | | |
572 | 575 | | |
573 | 576 | | |
574 | | - | |
| 577 | + | |
575 | 578 | | |
576 | | - | |
| 579 | + | |
577 | 580 | | |
578 | 581 | | |
579 | 582 | | |
| |||
758 | 761 | | |
759 | 762 | | |
760 | 763 | | |
761 | | - | |
762 | 764 | | |
763 | | - | |
764 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
765 | 770 | | |
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
| 776 | + | |
771 | 777 | | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
782 | 781 | | |
783 | 782 | | |
784 | 783 | | |
785 | 784 | | |
786 | 785 | | |
| 786 | + | |
787 | 787 | | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
798 | 791 | | |
799 | 792 | | |
800 | 793 | | |
801 | 794 | | |
802 | 795 | | |
803 | 796 | | |
804 | | - | |
| 797 | + | |
805 | 798 | | |
806 | 799 | | |
807 | | - | |
| 800 | + | |
808 | 801 | | |
809 | 802 | | |
810 | | - | |
811 | | - | |
812 | 803 | | |
| 804 | + | |
| 805 | + | |
813 | 806 | | |
814 | 807 | | |
815 | 808 | | |
| |||
1425 | 1418 | | |
1426 | 1419 | | |
1427 | 1420 | | |
1428 | | - | |
| 1421 | + | |
1429 | 1422 | | |
1430 | 1423 | | |
1431 | 1424 | | |
| |||
1435 | 1428 | | |
1436 | 1429 | | |
1437 | 1430 | | |
1438 | | - | |
| 1431 | + | |
1439 | 1432 | | |
1440 | 1433 | | |
1441 | 1434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
0 commit comments