Skip to content

doc: mention node:stream/consumers in stream overview#62613

Open
NinadUbale wants to merge 2 commits intonodejs:mainfrom
NinadUbale:doc-stream-consumers
Open

doc: mention node:stream/consumers in stream overview#62613
NinadUbale wants to merge 2 commits intonodejs:mainfrom
NinadUbale:doc-stream-consumers

Conversation

@NinadUbale
Copy link
Copy Markdown

This PR adds a brief reference to the node:stream/consumers utility functions in the main stream documentation (doc/api/stream.md).

As discussed in issue #62535, the node:stream/consumers module provides convenient, "batteries-included" utility functions that are often missed by developers who instead write manual boilerplate to consume streams into strings or buffers.

Linking it directly where the docs state "It is usually not necessary to use the node:stream module to consume streams" greatly improves discoverability for developers.

Fixes #62535

Adds a reference to the node:stream/consumers utility functions in the main stream documentation to improve discoverability.

Refs: nodejs#62535
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem. labels Apr 6, 2026
Streams can be readable, writable, or both. All streams are instances of
[`EventEmitter`][].

```markdown
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```markdown


The `node:stream` module is useful for creating new types of stream instances.
It is usually not necessary to use the `node:stream` module to consume streams.
For common tasks like reading a stream into a string or buffer, the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For common tasks like reading a stream into a string or buffer, the
For common tasks like reading a stream into a string or buffer, the

The `node:stream` module is useful for creating new types of stream instances.
It is usually not necessary to use the `node:stream` module to consume streams.
For common tasks like reading a stream into a string or buffer, the
[`node:stream/consumers`](webstreams.md#utility-consumers) module provides
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual url should be moved to the bottom of the page with the rest of them...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFE: utility consumers are not mentioned on the Stream page

3 participants