Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorunknown <rosaxny@gmail.com>2020-03-20 19:28:11 +0300
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2020-04-14 13:03:31 +0300
commitb7e7559a12d38937e23fb2d60b1d9d6403673e40 (patch)
tree887c4d7734768444d64ee766d9eeb33b023fe91d /doc/api
parent8d8095f2d10d590cbc546963838d9d6e2cc26bbe (diff)
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')
-rw-r--r--doc/api/util.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index e1dadbf65f2..b702d5adba3 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`).