summaryrefslogtreecommitdiff
path: root/doc/api/util.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-10-23 21:28:42 -0700
committerRich Trott <rtrott@gmail.com>2019-10-26 08:39:41 -0700
commit10040500da6af33b602e35c3f3bbe28cf76c4c4a (patch)
tree69c2af94709de9ef7022c41423c0f618eb0d5e0a /doc/api/util.md
parent6858c7e3e7c30986d68a683d3d5e4ede4c0b529f (diff)
downloadandroid-node-v8-10040500da6af33b602e35c3f3bbe28cf76c4c4a.tar.gz
android-node-v8-10040500da6af33b602e35c3f3bbe28cf76c4c4a.tar.bz2
android-node-v8-10040500da6af33b602e35c3f3bbe28cf76c4c4a.zip
doc: remove dashes
The use of dashes -- in general, but especially in our docs -- can be problematic. It is used inconsistently and there is always another form of punctuation that is as good or better for the situation. In an effort to reduce the number of variations we use to display the same types of information, remove the various uses of dashes from the documentation. PR-URL: https://github.com/nodejs/node/pull/30101 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md42
1 files changed, 21 insertions, 21 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index 5cb5786a52..c87957b107 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -225,27 +225,27 @@ as a `printf`-like format string which can contain zero or more format
specifiers. Each specifier is replaced with the converted value from the
corresponding argument. Supported specifiers are:
-* `%s` - `String` will be used to convert all values except `BigInt`, `Object`
+* `%s`: `String` will be used to convert all values except `BigInt`, `Object`
and `-0`. `BigInt` values will be represented with an `n` and Objects that
have no user defined `toString` function are inspected using `util.inspect()`
with options `{ depth: 0, colors: false, compact: 3 }`.
-* `%d` - `Number` will be used to convert all values except `BigInt` and
+* `%d`: `Number` will be used to convert all values except `BigInt` and
`Symbol`.
-* `%i` - `parseInt(value, 10)` is used for all values except `BigInt` and
+* `%i`: `parseInt(value, 10)` is used for all values except `BigInt` and
`Symbol`.
-* `%f` - `parseFloat(value)` is used for all values expect `Symbol`.
-* `%j` - JSON. Replaced with the string `'[Circular]'` if the argument contains
+* `%f`: `parseFloat(value)` is used for all values expect `Symbol`.
+* `%j`: JSON. Replaced with the string `'[Circular]'` if the argument contains
circular references.
-* `%o` - `Object`. A string representation of an object with generic JavaScript
+* `%o`: `Object`. A string representation of an object with generic JavaScript
object formatting. Similar to `util.inspect()` with options
`{ showHidden: true, showProxy: true }`. This will show the full object
including non-enumerable properties and proxies.
-* `%O` - `Object`. A string representation of an object with generic JavaScript
+* `%O`: `Object`. A string representation of an object with generic JavaScript
object formatting. Similar to `util.inspect()` without options. This will show
the full object not including non-enumerable properties and proxies.
-* `%c` - `CSS`. This specifier is currently ignored, and will skip any CSS
+* `%c`: `CSS`. This specifier is currently ignored, and will skip any CSS
passed in.
-* `%%` - single percent sign (`'%'`). This does not consume an argument.
+* `%%`: single percent sign (`'%'`). This does not consume an argument.
* Returns: {string} The formatted string
If a specifier does not have a corresponding argument, it is not replaced:
@@ -665,18 +665,18 @@ via the `util.inspect.styles` and `util.inspect.colors` properties.
The default styles and associated colors are:
-* `bigint` - `yellow`
-* `boolean` - `yellow`
-* `date` - `magenta`
-* `module` - `underline`
-* `name` - (no styling)
-* `null` - `bold`
-* `number` - `yellow`
-* `regexp` - `red`
-* `special` - `cyan` (e.g., `Proxies`)
-* `string` - `green`
-* `symbol` - `green`
-* `undefined` - `grey`
+* `bigint`: `yellow`
+* `boolean`: `yellow`
+* `date`: `magenta`
+* `module`: `underline`
+* `name`: (no styling)
+* `null`: `bold`
+* `number`: `yellow`
+* `regexp`: `red`
+* `special`: `cyan` (e.g., `Proxies`)
+* `string`: `green`
+* `symbol`: `green`
+* `undefined`: `grey`
The predefined color codes are: `white`, `grey`, `black`, `blue`, `cyan`,
`green`, `magenta`, `red` and `yellow`. There are also `bold`, `italic`,