Generates a UUID v4 string using the available crypto API Falls back to a simple implementation if crypto.randomUUID is not available
A UUID v4 string
const id = generateUUID(); // "f47ac10b-58cc-4372-a567-0e02b2c3d479" Copy
const id = generateUUID(); // "f47ac10b-58cc-4372-a567-0e02b2c3d479"
Generates a UUID v4 string using the available crypto API Falls back to a simple implementation if crypto.randomUUID is not available