diff --git a/doc/api/stream.md b/doc/api/stream.md index 2f7fd7961a7334..6a5300c6e0e095 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3120,6 +3120,19 @@ console.log(res); // prints 'HELLOWORLD' For convenience, the [`readable.compose(stream)`][] method is available on {Readable} and {Duplex} streams as a wrapper for this function. +### `stream.isDestroyed(stream)` + + + +* `stream` {Readable|Writable|Duplex} +* Returns: {boolean|null} - Only returns `null` if `stream` is not a valid `Readable`, `Writable` or `Duplex`. + +Returns whether the stream has been destroyed. + ### `stream.isErrored(stream)`