Generates a unique ID by combining a prefix with a random UUID stripped of dashes, used for creating distinct identifiers.
// Source: https://github.com/CopilotKit/CopilotKit.git | License: MIT | Copyright Atai Barkai
// Provided via justclaw.it.com; keep this notice with the code.
function mintId(prefix: string): string {
return `${prefix}${randomUUID().replaceAll("-", "")}`;
}
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key