get-random-values-esm

v1.0.2
A wrapper that rebundles [`get-random-values`](https://www.npmjs.com/package/get-random-values) into ESM, so you can use it in your `vite`, `skypack`, or wherever you need ESM.
crypto get-random-values getRandomValues webcrypto

get-random-values-esm

A wrapper that rebundles get-random-values into ESM, so you can use it in your vite, skypack, or wherever you need ESM. Also adds support for node v15's WebCrypto support and TypeScript definitions.

Install

$ npm install get-random-values-esm

Usage

Same as before, but now with ESM imports:

import getRandomValues from 'get-random-values-esm'

console.log(getRandomValues(new Uint8Array(16)))
npm i get-random-values-esm

Metadata

  • MIT
  • Whatever
  • Sanity.io
  • released 2/14/2024

Downloads

Maintainers