Checks if the given string is a valid UUID (Universally Unique Identifier).

  • Parameters

    • value: string

      The string to validate.

    • version:
          | 1
          | 2
          | 3
          | 4
          | 5
          | "4"
          | "1"
          | "2"
          | "3"
          | "5"
          | "all" = 'all'

      The UUID version to check against (1, 2, 3, 4, 5, 'all', null, or undefined). Defaults to 'all'.

    Returns boolean

    True if the string is a valid UUID, false otherwise.