util: compact inspect() for sparse arrays by dcposch · Pull Request #5070 · nodejs/node

@mscdex added the util

Issues and PRs related to the built-in util module.

label

Feb 4, 2016

@dcposch

This prevents `console.log(arr)` from crashing node when given a sparse
array with large length. Fixes nodejs#4905

@dcposch dcposch changed the title Compact output when printing sparse arrays util: compact inspect() for sparse arrays

Feb 4, 2016

@rvagg rvagg added the semver-major

PRs that contain breaking changes and should be released in the next major version.

label

Feb 19, 2016

jasnell added a commit to jasnell/node that referenced this pull request

May 3, 2016
As an alternative to nodejs#5070,
set the max length of Arrays/TypedArrays in util.inspect() to
`100` and provide a `maxArrayLength` option to override.

jasnell added a commit that referenced this pull request

May 3, 2016
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>

Fishrock123 pushed a commit that referenced this pull request

May 4, 2016
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>

joelostrowski pushed a commit to joelostrowski/node that referenced this pull request

May 4, 2016
As an alternative to nodejs#5070,
set the max length of Arrays/TypedArrays in util.inspect() to
`100` and provide a `maxArrayLength` option to override.

PR-URL: nodejs#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>