diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-02 07:56:14 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-15 17:30:50 +0200 |
commit | 1940114ac323695c758f21a00394b958a68d8428 (patch) | |
tree | ac64cc180479672da3eb6dfee02642fde784cbd0 /doc/api | |
parent | 693401d0ddd752e5fa47b882e56e252c42c94c0e (diff) | |
download | android-node-v8-1940114ac323695c758f21a00394b958a68d8428.tar.gz android-node-v8-1940114ac323695c758f21a00394b958a68d8428.tar.bz2 android-node-v8-1940114ac323695c758f21a00394b958a68d8428.zip |
util: highlight stack frames
Using `util.inspect` on errors is going to highlight userland and
node_module stack frames from now on. This is done by marking Node.js
core frames grey and frames that contain `node_modules` in their path
yellow.
That way it's easy to grasp what frames belong to what code.
PR-URL: https://github.com/nodejs/node/pull/27052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/util.md | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/api/util.md b/doc/api/util.md index ceaa01d5b0..4d8cfda1d9 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -638,15 +638,16 @@ via the `util.inspect.styles` and `util.inspect.colors` properties. The default styles and associated colors are: - * `number` - `yellow` - * `boolean` - `yellow` - * `string` - `green` - * `date` - `magenta` - * `regexp` - `red` - * `null` - `bold` - * `undefined` - `grey` - * `special` - `cyan` (only applied to functions at this time) - * `name` - (no styling) +* `number` - `yellow` +* `boolean` - `yellow` +* `string` - `green` +* `date` - `magenta` +* `module` - `underline` +* `regexp` - `red` +* `null` - `bold` +* `undefined` - `grey` +* `special` - `cyan` (only applied to functions at this time) +* `name` - (no styling) The predefined color codes are: `white`, `grey`, `black`, `blue`, `cyan`, `green`, `magenta`, `red` and `yellow`. There are also `bold`, `italic`, |