diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-12 03:26:15 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-17 16:42:36 +0100 |
commit | be3ae339360c9833a77ebf5772786d75b7a8dd78 (patch) | |
tree | c52c3e2b5843eb12fb3d177c47b760877e57de7a /doc/api/console.md | |
parent | a361b94b783bc92296307602f56d8beccad3fd22 (diff) | |
download | android-node-v8-be3ae339360c9833a77ebf5772786d75b7a8dd78.tar.gz android-node-v8-be3ae339360c9833a77ebf5772786d75b7a8dd78.tar.bz2 android-node-v8-be3ae339360c9833a77ebf5772786d75b7a8dd78.zip |
console: add `inspectOptions` option
Add an `inspectOptions` option to the `console` constructor. That
way it's possible to define all inspection defaults for each
`console` instance instead of relying on the `inspect()` defaults.
PR-URL: https://github.com/nodejs/node/pull/24978
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'doc/api/console.md')
-rw-r--r-- | doc/api/console.md | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/api/console.md b/doc/api/console.md index 42968d2eb9..cd229c0a0f 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -88,6 +88,9 @@ changes: pr-url: https://github.com/nodejs/node/pull/19372 description: The `Console` constructor now supports an `options` argument, and the `colorMode` option was introduced. + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/24978 + description: The `inspectOptions` option is introduced. --> * `options` {Object} @@ -98,8 +101,11 @@ changes: * `colorMode` {boolean|string} Set color support for this `Console` instance. Setting to `true` enables coloring while inspecting values, setting to `'auto'` will make color support depend on the value of the `isTTY` property - and the value returned by `getColorDepth()` on the respective stream. + and the value returned by `getColorDepth()` on the respective stream. This + option can not be used, if `inspectOptions.colors` is set as well. **Default:** `'auto'`. + * `inspectOptions` {Object} Specifies options that are passed along to + [`util.inspect()`][]. Creates a new `Console` with one or two writable stream instances. `stdout` is a writable stream to print log or info output. `stderr` is used for warning or |