镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/api/stream_iter.md
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ added: v26.1.0
> Stability: 1 - Experimental

* `readable` {stream.Readable|Object} A classic Readable stream or any object
with `read()` and `on()` methods.
with `read()`, `on()`, and `off()` methods.
* Returns: {AsyncIterable\<Uint8Array\[]>} A stream/iter async iterable source.

Converts a classic Readable stream (or duck-typed equivalent) into a
Expand All @@ -1478,8 +1478,8 @@ stream/iter async iterable source that can be passed to [`from()`][],

If the object implements the [`toAsyncStreamable`][] protocol (as
`stream.Readable` does), that protocol is used. Otherwise, the function
duck-types on `read()` and `on()` (EventEmitter) and wraps the stream with
a batched async iterator.
duck-types on `read()`, `on()`, and `off()` (EventEmitter) and wraps the
stream with a batched async iterator.

The result is cached per instance -- calling `fromReadable()` twice with the
same stream returns the same iterable.
Expand Down
Loading