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: Do uuid generate need to be a async function? #6262

Open
MartinEide opened this issue Dec 13, 2024 · 1 comment
Open

feat: Do uuid generate need to be a async function? #6262

MartinEide opened this issue Dec 13, 2024 · 1 comment

Comments

@MartinEide
Copy link

MartinEide commented Dec 13, 2024

Is your feature request related to a problem? Please describe.
When using uuid package. (uuid5)
Because of the nature of it being async, it does sort of making everything async where i need it.

Describe the solution you'd like
In my case i enjoy to generate determistic uuid in mapping of arrays. That is not something i like to make async if i can avoid it.

Describe alternatives you've considered
We have our own implementation that works. (node environment). But it would be nice to offload the responsibility of maintance of that to a esm package. It will also give us access to other uuid implementation not just v5.

Otherwise usage feels amazing.

Edit:
Any reason why crypto.subtle.digest is prefered over crypto.createHash?

@MartinEide MartinEide changed the title Do uuid generate need to be a async function? feat: Do uuid generate need to be a async function? Dec 13, 2024
@babiabeo
Copy link
Contributor

Because crypto.createHash is a part of node:crypto module, not the Web Crypto API.

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

No branches or pull requests

2 participants