Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorRaz Luvaton <rluvaton@gmail.com>2021-07-24 23:13:23 +0300
committerLuigi Pinca <luigipinca@gmail.com>2021-08-16 16:49:47 +0300
commite087d78472a8813c45e6a49ea43198e4534a71ac (patch)
tree6e12ee88f60a90cf3589af1350a788428e197bc8 /doc/api
parent802ceea905848fea64a4d0630ebff1e949dc3707 (diff)
doc: correct cjs code to match mjs code
PR-URL: https://github.com/nodejs/node/pull/39509 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Harshitha K P <harshitha014@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/async_hooks.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index 851b3fe3a90..02bb9d3001b 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -374,14 +374,14 @@ net.createServer((conn) => {}).listen(8080);
```cjs
const { createHook, executionAsyncId } = require('async_hooks');
-const { fd } = require('process').stdout;
+const { stdout } = require('process');
const net = require('net');
createHook({
init(asyncId, type, triggerAsyncId) {
const eid = executionAsyncId();
fs.writeSync(
- fd,
+ stdout.fd,
`${type}(${asyncId}): trigger: ${triggerAsyncId} execution: ${eid}\n`);
}
}).enable();