Generates random values. The same function as the standard crypto.getRandomValues.
The result is generated using the cryptographically secure random number generator.
values(typedArray)
typedArray
A integer typed array to fill with random values.
The same typed array as the parameter, filled with random values.
random.values(new Uint8Array(8))
Uint8Array [181, 221, 110, 124, 191, 102, 40, 246]
random.values(new BigInt64Array(2))
BigInt64Array [1364260839042713042, -2173253636153072395]
random.values(new Float64Array(8))
TypeError: not an integer array