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

Use Uint8Array instead of Buffer #29

Closed
AnyhowStep opened this issue Nov 18, 2019 · 0 comments
Closed

Use Uint8Array instead of Buffer #29

AnyhowStep opened this issue Nov 18, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@AnyhowStep
Copy link
Owner

The BLOB data type should be of type Uint8Array.

  • Uint8Array is used on browser environments.
  • Buffer is used on node environments.

However, Buffer extends Uint8Array.

So, Uint8Array perfectly captures what the BLOB data type is in JS-land.


Right now, using this library on browser environments would require a Buffer polyfill.

This is terrible.

@AnyhowStep AnyhowStep added the bug Something isn't working label Nov 18, 2019
@AnyhowStep AnyhowStep self-assigned this Nov 18, 2019
AnyhowStep added a commit to AnyhowStep/type-mapping that referenced this issue Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant