4 lines
121 B
TypeScript
4 lines
121 B
TypeScript
export function uuid(): string {
|
|
return globalThis.crypto?.randomUUID?.() ?? Math.random().toString(36).substring(2);
|
|
}
|