From e087d78472a8813c45e6a49ea43198e4534a71ac Mon Sep 17 00:00:00 2001 From: Raz Luvaton Date: Sat, 24 Jul 2021 23:13:23 +0300 Subject: [PATCH] doc: correct cjs code to match mjs code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/39509 Reviewed-By: Tobias Nießen Reviewed-By: Harshitha K P Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Vladimir de Turckheim --- doc/api/async_hooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 851b3fe3a907fc..02bb9d3001bb28 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();