Files
t3code/apps/web/src/components/preview/previewAutomationClientId.ts
T

5 lines
229 B
TypeScript

export function createPreviewAutomationClientId(): string {
const bytes = globalThis.crypto.getRandomValues(new Uint8Array(16));
return `preview-${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
}