Generate a RFC4122 v5 UUID (SHA-1 namespace).
import uuidv5 from "uuidv5";const NAMESPACE_URL = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";const data = new TextEncoder().encode("example.org")const uuid = uuidv5.generate(NAMESPACE_URL, data);uuid === "886313e1-3b8a-5372-9b90-0c9aee199e5d" // true
uuid
The namespace to use, uuid valid
The data to hash to calculate the SHA-1 digest for the UUID
Generated using TypeDoc
Generate a RFC4122 v5 UUID (SHA-1 namespace).
Returns
uuid