From 48b32f954f5261c4525efb19fa5df7be4cbfa02f Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 31 May 2018 16:35:08 +0200 Subject: [PATCH] doc: add options documentation to Stream.finished() When originally implemented it was missed that Stream.finished() has an optional options object. This adds the docs to those. --- doc/api/stream.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index c42df4ee7c757d..8e7d741fab597b 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1294,12 +1294,21 @@ implementors should not override this method, but instead implement [`readable._destroy()`][readable-_destroy]. The default implementation of `_destroy()` for `Transform` also emit `'close'`. -### stream.finished(stream, callback) +### stream.finished(stream[, options], callback) * `stream` {Stream} A readable and/or writable stream. +* `options` {Object} + * `error` {boolean} If set to `false` a call to emit('error', err) is not + treated finished. **Default**: `true`. + * `readable` {boolean} When set to `false` the callback will be called after + the stream ended but the stream might still be readable. **Default**: + `true`. + * `writable` {boolean} When set to `false` the callback will be called after + the stream ended but the stream might still be writable. **Default**: + `true`. * `callback` {Function} A callback function that takes an optional error argument.