Skip to content

Commit

Permalink
doc: improve doc writable streams: 'finish' event
Browse files Browse the repository at this point in the history
doc change for stream.md that 'finish' event should be before
writer.end

fixes: #30759

PR-URL: #30889
Fixes: #30759
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
dev-script authored and MylesBorins committed Dec 17, 2019
1 parent 0d2172f commit b53e2a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ const writer = getWritableStreamSomehow();
for (let i = 0; i < 100; i++) {
writer.write(`hello, #${i}!\n`);
}
writer.end('This is the end\n');
writer.on('finish', () => {
console.log('All writes are now complete.');
});
writer.end('This is the end\n');
```

##### Event: 'pipe'
Expand Down

0 comments on commit b53e2a8

Please sign in to comment.