Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make Uint8Array the one and only type used for binary (byte) uuid values #755

Closed
broofa opened this issue Jun 4, 2024 · 0 comments · Fixed by #763
Closed

Make Uint8Array the one and only type used for binary (byte) uuid values #755

broofa opened this issue Jun 4, 2024 · 0 comments · Fixed by #763

Comments

@broofa
Copy link
Member

broofa commented Jun 4, 2024

This library runs pretty fast and loose when it comes to binary (byte) uuid types. Array, Buffer, Uint8Array... it basically works with anything array-like. This is largely a result of the code having been written before Uint8Array became a thing.

... but now that Uint8Array is ubiguitous, it's pretty obviously the right type for this. We should embrace that fact and adopt that as the one / only type we work with for binary uuids. Doing so will allow us to remove the need to support an offset option, and will also let us leverage APIs like set() for efficiently copying array values.

@broofa broofa changed the title Replace occurances of "Buffer" and "new Array" with Uint8Array Make Uint8Array the one and only type used for binary (byte) uuid values Jun 4, 2024
@broofa broofa linked a pull request Jul 2, 2024 that will close this issue
7 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant