Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document node:stream/consumers #58

Merged
merged 2 commits into from
Aug 7, 2023
Merged

Document node:stream/consumers #58

merged 2 commits into from
Aug 7, 2023

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Aug 7, 2023

The methods exposed by node:stream/consumers (available since 16.14.0):

  • Are slightly simpler than calling toArray() + join()
  • Are faster
  • Work with browser-compatible ReadableStream, not only Node.js streams

They can also output buffers. For this reason, this PR also updates what seems to be the remaining reasons to use this package: the maxBuffer and encoding options.

@sindresorhus sindresorhus merged commit 953fb39 into sindresorhus:main Aug 7, 2023
3 checks passed
@ehmicky ehmicky deleted the document-consumers branch August 7, 2023 00:45
@ehmicky ehmicky mentioned this pull request Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants