Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/uuid/mod.ts>v4.generate

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function v4.generate
Deprecated
Deprecated

v4 UUID generation is deprecated and will be removed in a future std/uuid release. Use the web standard globalThis.crypto.randomUUID() function instead.

Generate a RFC4122 v4 UUID (pseudo-random).

import { v4 } from "https://deno.land/std@0.118.0/uuid/mod.ts";
const { generate } = v4;

Returns

string