@tanstack/db
Version:
A reactive client store for building super fast apps on sync
12 lines (11 loc) • 437 B
TypeScript
/**
* Returns a RFC 4122 version 4 UUID.
*
* Prefers `crypto.randomUUID()` when available. In non-secure browser contexts
* (e.g. a dev server accessed via a LAN IP over HTTP) `crypto.randomUUID` is
* `undefined`, so this falls back to building a UUIDv4 from
* `crypto.getRandomValues`. Throws if neither API is available.
*
* See https://github.com/TanStack/db/issues/1541.
*/
export declare function safeRandomUUID(): string;