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

Add getStreamAsArrayBuffer() method #81

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Add getStreamAsArrayBuffer() method #81

merged 1 commit into from
Aug 9, 2023

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Aug 9, 2023

This PR continues implementing support for web streams (ReadableStream). This adds a getStreamAsArrayBuffer() method that is like getStreamAsBuffer() except it returns an ArrayBuffer instead of a Node.js Buffer.

This is more convenient for web streams, which use ArrayBuffer under-the-hood.

This is also useful for users who prefer ArrayBuffer over Buffer since Buffer is Node.js-specific while ArrayBuffer is available in any JavaScript environment.

@sindresorhus sindresorhus merged commit fa7153b into sindresorhus:main Aug 9, 2023
3 checks passed
sindresorhus pushed a commit that referenced this pull request Aug 9, 2023
@ehmicky ehmicky changed the title Add support for DataView stream chunks Add getStreamAsArrayBuffer() method Aug 9, 2023
@ehmicky ehmicky deleted the get-stream-as-array-buffer branch August 9, 2023 20:28
@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.

None yet

2 participants