Skip to content

Docs say that 'data' event mechanisms is preferred over 'readable' #11587

Closed
@StarpTech

Description

@StarpTech

In the docs saying:

Note: In general, the readable.pipe() and 'data' event mechanisms are preferred over the use of the 'readable' event.

Reference: https://nodejs.org/dist/latest-v6.x/docs/api/stream.html#stream_readable_streams

What does 'general' means because of simplicity ? I think it should be better documented. Pull streams are much more efficient e.g referring to buffering and back-pressure.

https://gist.github.com/caike/ebccc95bd46f5fa1404d

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.questionIssues that look for answers.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions