feat: use Node.js v15.6 crypto.randomUUID() functions if it's avail…#555
feat: use Node.js v15.6 crypto.randomUUID() functions if it's avail…#555piranna wants to merge 1 commit intouuidjs:mainfrom
crypto.randomUUID() functions if it's avail…#555Conversation
|
Thanks for the PR! I'm not 100% sure about the current approach though 🤔 First of all, this tries to import
But even without that, since it takes the UUID string returned from How about falling back to function v4(options, buf, offset) {
options = options || {};
if (buf == null && options.random == null && options.rng == null) {
return randomUUID()
}
// ...
}We would also need to solve the importing of
This would then be configured the same way as e.g. |
|
I don't like current aproach too much too, I was thinking more about |
|
Where are we at with this? |
|
Implemented the changes I described in a new PR: #600 It gives an 11x speedup on my computer 🤩 |
…able