Function UUID

  • Generate a Universally Unique Identifier (UUID) using random hexadecimal characters. The UUID follows the format 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx', where 'x' represents a random hexadecimal digit (0-9, a-f), and 'y' represents a random hexadecimal digit (8, 9, a, or b).

    Returns `${string}-${string}-${string}-${string}-${string}`

    A randomly generated UUID.

    Example

    const uuid = RNG.UUID();
    console.log(uuid); // Output: e.g., "f47ac10b-58cc-4372-a567-0e02b2c3d479"

Generated using TypeDoc