mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
doc: fix typo in pipe from async iterator example
PR-URL: https://github.com/nodejs/node/pull/27870 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
67b692bdb9
commit
b7cd0de145
1 file changed
+1
-1
+1
-1
@@ -2487,7 +2487,7 @@ const writeable = fs.createWriteStream('./file');
|
||||
(async function() {
|
||||
for await (const chunk of iterator) {
|
||||
// Handle backpressure on write
|
||||
if (!writeable.write(value))
|
||||
if (!writeable.write(chunk))
|
||||
await once(writeable, 'drain');
|
||||
}
|
||||
writeable.end();
|
||||
|
||||
Reference in new issue
Block a user