diff options
author | unknown <rosaxny@gmail.com> | 2020-03-20 12:28:11 -0400 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2020-04-14 11:03:31 +0100 |
commit | b7e7559a12d38937e23fb2d60b1d9d6403673e40 (patch) | |
tree | 887c4d7734768444d64ee766d9eeb33b023fe91d /doc/api/util.md | |
parent | 8d8095f2d10d590cbc546963838d9d6e2cc26bbe (diff) | |
download | node-new-b7e7559a12d38937e23fb2d60b1d9d6403673e40.tar.gz |
util: add `maxStrLength` option to `inspect` function
Refs: https://github.com/nodejs/node/issues/25478
PR-URL: https://github.com/nodejs/node/pull/32392
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r-- | doc/api/util.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/util.md b/doc/api/util.md index e1dadbf65f..b702d5adba 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -398,6 +398,9 @@ stream.write('With ES6'); <!-- YAML added: v0.3.0 changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/32392 + description: The `maxStringLength` option is supported now. - version: v13.5.0 pr-url: https://github.com/nodejs/node/pull/30768 description: User defined prototype properties are inspected in case @@ -483,6 +486,9 @@ changes: [`TypedArray`][], [`WeakMap`][] and [`WeakSet`][] elements to include when formatting. Set to `null` or `Infinity` to show all elements. Set to `0` or negative to show no elements. **Default:** `100`. + * `maxStringLength` {integer} Specifies the maximum number of characters to + include when formatting. Set to `null` or `Infinity` to show all elements. + Set to `0` or negative to show no characters. **Default:** `Infinity`. * `breakLength` {integer} The length at which input values are split across multiple lines. Set to `Infinity` to format the input as a single line (in combination with `compact` set to `true` or any number >= `1`). |