@npmextras/get-random-values
v1.0.1
Published
Cross browser and node.js implementation to generate random values
Downloads
2
Readme
get-random-values
Cross browser and node.js implementation to generate random values.
Either uses:
- window.crypto
- window.msCrypto
- node crypto
if it exists, otherwise throws.
Example
import getRandomValues from 'get-random-values';
const array = getRandomValues(new Uint32Array(4));
// [9, 50, 194, 143]
Installation
npm install github:ProtonMail/get-random-values.git#semver:^1.0.0