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

feat: support decoding ArrayBuffers #127

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

achingbrain
Copy link
Member

Expands supported input types to include ArrayBuffers to make it easiser for users to use modules like fetch that don't return Uint8Arrays.

Expands supported input types to include `ArrayBuffer`s to make it
easiser for users to use modules like `fetch` that don't return
`Uint8Array`s.
@achingbrain achingbrain requested a review from rvagg February 15, 2024 14:41
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

my only worry about this is the potential for foot-guns when people are using buffers that really should be wrapped in views because the data they really want to deal with is a small piece of that whole buffer but the view got lost along the way due to said footgun of compatibility.

@achingbrain
Copy link
Member Author

I don't disagree, but ArrayBuffer is all over the W3C specs so we kind of have to accept them warts and all if we want to play nicely with browser APIs.

@achingbrain achingbrain merged commit 1e6cc99 into master Feb 16, 2024
18 checks passed
@achingbrain achingbrain deleted the feat/support-decoding-array-buffers branch February 16, 2024 11:01
github-actions bot pushed a commit that referenced this pull request Feb 16, 2024
## [10.2.0](v10.1.7...v10.2.0) (2024-02-16)

### Features

* support decoding ArrayBuffers ([#127](#127)) ([1e6cc99](1e6cc99))
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