Package Exports
- @neumatter/random-fill
- @neumatter/random-fill/browser.js
- @neumatter/random-fill/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@neumatter/random-fill) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
randomFill
Random Fill function. Works in nodejs and browser.
Table of Contents
Install
npm i @neumatter/random-fillUsage
import randomFill from '@neumatter/random-fill'
const view = new Uint8Array(32)
randomFill(view)
// ...use viewimport randomFill from '@neumatter/random-fill'
import ByteView from 'byteview'
const view = ByteView.alloc(32)
randomFill(view)
// ...use viewimport randomFill from '@neumatter/random-fill'
const view = Buffer.allocUnsafe(32)
randomFill(view)
// ...use viewimport randomFill from '@neumatter/random-fill'
const view = new Uint16Array(16)
randomFill(view)
// ...use view