Skip to main content

@std/uuid@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
function v3.generate
generate(
namespace: string,
): Promise<string>

Generate a RFC4122 v3 UUID (MD5 namespace).

Examples

Example 1

import { generate } from "@std/uuid/v3";

const NAMESPACE_URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";

const uuid = await generate(NAMESPACE_URL, new TextEncoder().encode("python.org"));
uuid === "22fe6191-c161-3d86-a432-a81f343eda08" // true

Parameters

namespace: string

The namespace to use, encoded as a UUID.

The data to hash to calculate the MD5 digest for the UUID.

Return Type

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/uuid

Import symbol

import { v3 } from "@std/uuid";
or

Import directly with a jsr specifier

import { v3 } from "jsr:@std/uuid";