summaryrefslogtreecommitdiff
path: root/doc/api/util.md
diff options
context:
space:
mode:
authorestrada9166 <estrada9166@hotmail.com>2018-02-12 02:31:55 -0500
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-23 16:26:29 +0000
commita29089d7c866955616c0e363843017e9b9b2a736 (patch)
tree28bb543eea1a6bd814da31d854daa8680fdc5a90 /doc/api/util.md
parent3a191229418dcc0e21956847993b1702c88a923b (diff)
downloadandroid-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.tar.gz
android-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.tar.bz2
android-node-v8-a29089d7c866955616c0e363843017e9b9b2a736.zip
doc: add new documentation lint rule
Add 80 characters limit to docs. Change docs to fit 80 characters per row. PR-URL: https://github.com/nodejs/node/pull/18726 Fixes: https://github.com/nodejs/node/issues/18703 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index dd5620c480..ae4094b73a 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -107,7 +107,8 @@ const debuglog = util.debuglog('foo-bar');
debuglog('hi there, it\'s foo-bar [%d]', 2333);
```
-if it is run with `NODE_DEBUG=foo*` in the environment, then it will output something like:
+if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
+something like:
```txt
FOO-BAR 3257: hi there, it's foo-bar [2333]
```
@@ -206,8 +207,9 @@ corresponding argument. Supported placeholders are:
contains circular references.
* `%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.
+ 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
object formatting. Similar to `util.inspect()` without options. This will show
the full object not including non-enumerable properties and proxies.
@@ -400,8 +402,8 @@ The `util.inspect()` method returns a string representation of `object` that is
intended for debugging. The output of `util.inspect` may change at any time
and should not be depended upon programmatically. Additional `options` may be
passed that alter certain aspects of the formatted string.
-`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make an
-identifiable tag for an inspected value.
+`util.inspect()` will use the constructor's name and/or `@@toStringTag` to make
+an identifiable tag for an inspected value.
```js
class Foo {
@@ -702,7 +704,8 @@ console.log(promisified === doSomething[util.promisify.custom]);
This can be useful for cases where the original function does not follow the
standard format of taking an error-first callback as the last argument.
-For example, with a function that takes in `(foo, onSuccessCallback, onErrorCallback)`:
+For example, with a function that takes in
+`(foo, onSuccessCallback, onErrorCallback)`:
```js
doSomething[util.promisify.custom] = (foo) => {