JavaScript UUID
How to generate a standard UUID (typically v4) in JavaScript, using the standard library or a widely used package.
Code
crypto.randomUUID();
// '3f2a9c8b-4d1e-4a7b-9c2d-1e2f3a4b5c6d'
// Node 19+ and all modern browsers
Most languages provide v4 (random) out of the box, while v7 or ULID may require a separate library.