@lumino/coreutils
Version:
Lumino Core Utilities
14 lines (13 loc) • 509 B
TypeScript
/**
* A function which creates a function that generates UUID v4 identifiers.
*
* @returns A new function that creates a UUID v4 string.
*
* #### Notes
* This implementation complies with RFC 4122.
*
* This uses `Random.getRandomValues()` for random bytes, which in
* turn will use the underlying `crypto` module of the platform if
* it is available. The fallback for randomness is `Math.random`.
*/
export declare function uuid4Factory(getRandomValues: (bytes: Uint8Array) => void): () => string;