From 0c33ecb2bda914c69305a42c7c774ffa9ca5f408 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 9 Jan 2019 13:07:59 +0100 Subject: [PATCH] doc: document that stream.on('close') was changed in Node 10 See: https://github.com/nodejs/node/issues/25373 See: https://github.com/nodejs/node/pull/18438 PR-URL: https://github.com/nodejs/node/pull/25413 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Sam Roberts --- doc/api/stream.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index ca85ec69d86fd0..e951170ecff576 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -219,13 +219,19 @@ added: v0.9.4 ##### Event: 'close' The `'close'` event is emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur. -Not all `Writable` streams will emit the `'close'` event. +A [`Writable`][] stream will always emit the `'close'` event if it is +created with the `emitClose` option. ##### Event: 'drain' The `'close'` event is emitted when the stream and any of its underlying resources (a file descriptor, for example) have been closed. The event indicates that no more events will be emitted, and no further computation will occur. -Not all [`Readable`][] streams will emit the `'close'` event. +A [`Readable`][] stream will always emit the `'close'` event if it is +created with the `emitClose` option. ##### Event: 'data'