summaryrefslogtreecommitdiff
path: root/doc/api/util.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/util.md')
-rw-r--r--doc/api/util.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/util.md b/doc/api/util.md
index ba98a04534..982d3ebe53 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -101,6 +101,7 @@ where `3245` is the process id. If it is not run with that
environment variable set, then it will not print anything.
The `section` supports wildcard also:
+
```js
const util = require('util');
const debuglog = util.debuglog('foo-bar');
@@ -110,6 +111,7 @@ 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:
+
```txt
FOO-BAR 3257: hi there, it's foo-bar [2333]
```
@@ -889,6 +891,7 @@ doSomething[util.promisify.custom] = (foo) => {
});
};
```
+
If `promisify.custom` is defined but is not a function, `promisify()` will
throw an error.