Skip to content

Write HTML. Render video. Built for agents.

304 B
Raw Blame
// ponytail: crypto.randomUUID is undefined on plain HTTP non-localhost origins
export function generateId(): string {
  if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
    return crypto.randomUUID();
  }
  return `${Date.now()}-${Math.random().toString(36).slice(2)}`;
}