Skip to content

Conversation

jimmywarting
Copy link

@jimmywarting jimmywarting commented Jul 9, 2021

This will

  • update the devDep
  • it will not embed Buffer into the browser bundle (as they are always uint8array)
  • if argument is a arraybuffer, then just return it.
  • stop using Buffer constructor in test files
  • update the example in readme
  • and now it can also return the arraybuffer of any ArrayBuffer view (not just uint8array or buffer)

I would maybe have used new TextEncoder().encode(whatever).buffer as a fallback and not thrown on non typed arrays.
Would also like to have switched this to ESM only package
but decided to keep it as it's with as few changes

fixes #1
fixes #2
fixes #3

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.

1 participant