Skip to content

Commit

Permalink
doc: add options documentation to Stream.finished()
Browse files Browse the repository at this point in the history
When originally implemented it was missed that Stream.finished() has
an optional options object. This adds the docs to those.
  • Loading branch information
BridgeAR committed Aug 20, 2018
1 parent 3d893b9 commit 48b32f9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!-- YAML
added: v10.0.0
-->

* `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.

Expand Down

0 comments on commit 48b32f9

Please sign in to comment.