From a057510037ad541fc2fb96cb7f8605ef2f14de08 Mon Sep 17 00:00:00 2001 From: txxnano Date: Wed, 13 Jul 2022 07:14:38 -0300 Subject: [PATCH] stream: initial approach to include strategy options on Readable.toWeb() PR-URL: https://github.com/nodejs/node/pull/43515 Reviewed-By: Matteo Collina Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell --- doc/api/stream.md | 6 +- lib/internal/streams/readable.js | 6 +- lib/internal/webstreams/adapters.js | 34 ++++++--- .../test-stream-readable-strategy-option.js | 75 +++++++++++++++++++ 4 files changed, 109 insertions(+), 12 deletions(-) create mode 100644 test/parallel/test-stream-readable-strategy-option.js diff --git a/doc/api/stream.md b/doc/api/stream.md index 3dfe70845c7600..75e1825aae9dd6 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2789,7 +2789,7 @@ added: Returns whether the stream is readable. -### `stream.Readable.toWeb(streamReadable)` +### `stream.Readable.toWeb(streamReadable[, options])`