• A function which generates UUID v4 identifiers.

    Returns string

    A new UUID v4 string.

    Notes

    This implementation complies with RFC 4122.

    This uses Random.getRandomValues() for random bytes, which in turn will use the underlying crypto module of the platform if it is available. The fallback for randomness is Math.random.