From 1940114ac323695c758f21a00394b958a68d8428 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 2 Apr 2019 07:56:14 +0200 Subject: 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 Reviewed-By: James M Snell --- doc/api/util.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'doc/api/util.md') 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`, -- cgit v1.2.3