Commit 91ab769
util: truncate inspect array and typed array
As an alternative to #5070,
set the max length of Arrays/TypedArrays in util.inspect() to
`100` and provide a `maxArrayLength` option to override.
PR-URL: #6334
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>1 parent 33f24c8 commit 91ab769Copy full SHA for 91ab769
File tree
Expand file treeCollapse file tree
3 files changed
+75
-3
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- test/parallel
Expand file treeCollapse file tree
3 files changed
+75
-3
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
183 | 183 | |
184 | 184 | |
185 | 185 | |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
186 | 190 | |
187 | 191 | |
188 | 192 | |
|
Collapse file
+16-3Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| ||
141 | 142 | |
142 | 143 | |
143 | 144 | |
| 145 | + |
| 146 | + |
144 | 147 | |
145 | 148 | |
146 | 149 | |
| ||
579 | 582 | |
580 | 583 | |
581 | 584 | |
582 | | - |
| 585 | + |
| 586 | + |
| 587 | + |
583 | 588 | |
584 | 589 | |
585 | 590 | |
586 | 591 | |
587 | 592 | |
588 | 593 | |
589 | 594 | |
| 595 | + |
| 596 | + |
| 597 | + |
590 | 598 | |
591 | 599 | |
592 | 600 | |
| ||
598 | 606 | |
599 | 607 | |
600 | 608 | |
601 | | - |
602 | | - |
| 609 | + |
| 610 | + |
| 611 | + |
| 612 | + |
603 | 613 | |
| 614 | + |
| 615 | + |
| 616 | + |
604 | 617 | |
605 | 618 | |
606 | 619 | |
|
Collapse file
test/parallel/test-util-inspect.js
Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js+55Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
648 | 648 | |
649 | 649 | |
650 | 650 | |
| 651 | + |
| 652 | + |
| 653 | + |
| 654 | + |
| 655 | + |
| 656 | + |
| 657 | + |
| 658 | + |
| 659 | + |
| 660 | + |
| 661 | + |
| 662 | + |
| 663 | + |
| 664 | + |
| 665 | + |
| 666 | + |
| 667 | + |
| 668 | + |
| 669 | + |
| 670 | + |
| 671 | + |
| 672 | + |
| 673 | + |
| 674 | + |
| 675 | + |
| 676 | + |
| 677 | + |
| 678 | + |
| 679 | + |
| 680 | + |
| 681 | + |
| 682 | + |
| 683 | + |
| 684 | + |
| 685 | + |
| 686 | + |
| 687 | + |
| 688 | + |
| 689 | + |
| 690 | + |
| 691 | + |
| 692 | + |
| 693 | + |
| 694 | + |
| 695 | + |
| 696 | + |
| 697 | + |
| 698 | + |
| 699 | + |
| 700 | + |
| 701 | + |
| 702 | + |
| 703 | + |
| 704 | + |
| 705 | + |
0 commit comments