Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
12345678910111213const fallback = () => Math.random().toString(16).slice(2)
export function uuid() { const c = globalThis.crypto if (!c || typeof c.randomUUID !== "function") return fallback() if (typeof globalThis.isSecureContext === "boolean" && !globalThis.isSecureContext) return fallback() try { return c.randomUUID() } catch { return fallback() }}