4 ms·
> We're using this: https://www.npmjs.com/package/uuid https://www.npmjs.com/package/uuid Why? There's a built-in for this. https://nodejs.org/api/crypto.html
by sublinear 5mo ago
> We're using this: https://www.npmjs.com/package/uuid https://www.npmjs.com/package/uuid
Why? There's a built-in for this.
https://nodejs.org/api/crypto.html#cryptorandomuuidoptions https://nodejs.org/api/crypto.html#cryptorandomuuidoptions
- OptionOfT 5mo agoThat's what the package uses. And if `crypto.randomUUID()` doesn't exist, it falls back to `crypto.getRandomValues()`, which per the documentation isn't AS strong: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#:~:text=To%20guarantee%20enough,for%20cryptographic%20purposes. https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getR... So by using the package you actually lose visibility of cases where `crypto.randomUUID()` would fail.
- deleted 5mo ago[deleted]