diff options
author | James M Snell <jasnell@gmail.com> | 2021-06-24 08:24:19 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-07-13 20:03:16 +0300 |
commit | a99c2303051ba8f694ac3bc3cb99998525d9e249 (patch) | |
tree | 4f171e4e91730aff384a636394347ba75402e330 /doc/api | |
parent | 09b57f790939aba3faab84d4e55bd645fee874f7 (diff) |
stream: implement streams to webstreams adapters
Experimental adapters for the webstreams API
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/39134
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/stream.md | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index 47e1e04441d..252225aa073 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1892,6 +1892,87 @@ Calling `Readable.from(string)` or `Readable.from(buffer)` will not have the strings or buffers be iterated to match the other streams semantics for performance reasons. +### `stream.Readable.fromWeb(readableStream[, options])` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `readableStream` {ReadableStream} +* `options` {Object} + * `encoding` {string} + * `highWaterMark` {number} + * `objectModel` {boolean} + * `signal` {AbortSignal} +* Returns: {stream.Readable} + +### `stream.Readable.toWeb(streamReadable)` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `streamReadable` {stream.Readable} +* Returns: {ReadableStream} + +### `stream.Writable.fromWeb(writableStream[, options])` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `writableStream` {WritableStream} +* `options` {Object} + * `decodeStrings` {boolean} + * `highWaterMark` {number} + * `objectMode` {boolean} + * `signal` {AbortSignal} +* Returns: {stream.Writable} + +### `stream.Writable.toWeb(streamWritable)` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `streamWritable` {stream.Writable} +* Returns: {WritableStream} + +### `stream.Duplex.fromWeb(pair[, options])` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `pair` {Object} + * `readable` {ReadableStream} + * `writable` {WritableStream} +* `options` {Object} + * `allowHalfOpen` {boolean} + * `decodeStrings` {boolean} + * `encoding` {string} + * `highWaterMark` {number} + * `objectMode` {boolean} + * `signal` {AbortSignal} +* Returns: {stream.Duplex} + +### `stream.Duplex.toWeb(streamDuplex)` +<!-- YAML +added: REPLACEME +--> + +> Stability: 1 - Experimental + +* `streamDuplex` {stream.Duplex} +* Returns: {Object} + * `readable` {ReadableStream} + * `writable` {WritableStream} + ### `stream.addAbortSignal(signal, stream)` <!-- YAML added: v15.4.0 |