Generates a version 4 UUID (Universally Unique Identifier) as per RFC 4122.
A UUID is a 128-bit value that is unique across space and time. This function
uses the crypto.getRandomValues method to generate random values for the UUID
and ensures compliance with the version 4 and variant 10 specifications.
Returns string
A string representation of the generated UUID in the format:
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
where x is a hexadecimal digit and y is one of [8, 9, A, B].
Generates a version 4 UUID (Universally Unique Identifier) as per RFC 4122.
A UUID is a 128-bit value that is unique across space and time. This function uses the
crypto.getRandomValuesmethod to generate random values for the UUID and ensures compliance with the version 4 and variant 10 specifications.