Get random bytes as a Uint8Array
, using the same API in either Node or browsers.
Under the hood this will use the node:crypto
library if used in node, or crypto.getRandomValues in the browser.
Installation instructions
npm i -S @namespace/package
This exposes ESM and common JS via package.json exports
field.
import '@namespace/package/module'
require('@namespace/package/module')
import '@namespace/package-name/css'
Or minified:
import '@namespace/package-name/css/min'
component-name {
--example: pink;
}
usage instructions here
import '@namespace/package/module'
This package exposes minified JS files too. Copy them to a location that is accessible to your web server, then link to them in HTML.
cp ./node_modules/@namespace/package/dist/module.min.js ./public
<script type="module" src="./module.min.js"></script>