Function UUID

  • Generates a UUID (Universally Unique Identifier) as a string. This does not follow the ISO standards. It's just a random string with the first 32 bits being an encoded timestamp and the remaining bits being random bits. https://en.wikipedia.org/wiki/Universally_unique_identifier

    Parameters

    • bits: number = 128

      The number of bits to generate. Minimum is 32 as this only covers the timestamp-part of the UUID.

    • encoding: Encoding = 'base64url'

      The encoding to use for the output string. Default is 'binary'.

    Returns string

    A UUID as a string.

Generated using TypeDoc