1.0.1 • Published 4 years ago

@npmextras/get-random-values v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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