Today I learned that you can generate UUIDs using the Web Cryptography API.
Here’s what it looks like:
let uuid = self.crypto.randomUUID();
console.log(uuid); // “36b8f84d-df4e-4d49-b662-bcde71a8764f”
MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID
Top comments (0)