randomString

Generates a random string of the specified length. The default charset is alphanumeric characters.

It uses crypto.getRandomValues to generate the random string.

Example