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

Modernize #5

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Modernize #5

wants to merge 15 commits into from

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