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 BethGriggs committed Feb 6, 2020
1 parent 21ea47a commit be4fffe
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 @@ -294,10 +294,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 be4fffe

Please sign in to comment.