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:
parent
12f5e0f8f8
commit
eb4c1d5663
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user