-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
Support native randomUUID()
#554
Comments
It's certainly on my list but I'm not sure if and when I'll manage to work on it. But happy to review a pull request if you are interested in working on it. |
Here you have it :-) |
Following the discussion in #555 I think we could provide maybe even more value by providing an actual polyfill-package for the new API which works both, in Node.js and in the browser. For this purpose we've created https://github.com/uuidjs/randomUUID and reserved the npm package name: https://www.npmjs.com/package/randomuuid As a big disclaimer I have to say though that I can't tell when I will find the time to personally work on that. If you want, feel free to |
Interesting aproach, definitely would be useful at least for my use case (I'm a bit TOC about using w3c or browsers APIs if possible). We can just copy Node.js implementation, and do two polyfills, one for Node.js |
I have done a first implementation in uuidjs/randomUUID#1 based on code from Node.js. It works and have tests, but lacks documentation. |
Using native randomUUID unter the hood was added in #600. |
Starting on Node.js 15.6, there's support for a native
randomUUID()
implementation, that implements UUID v4. What about checking for its support on https://github.com/uuidjs/uuid/blob/master/src/v4.js and use it when available?The text was updated successfully, but these errors were encountered: