Detalhes do pacote

@neumatter/random-bytes

clyng57151.0.5

Random Bytes function. Works in node and browser.

arraybuffer, browser, buffer, dataview

readme (leia-me)

randomBytes

JavaScript Style Guide

Random Bytes function. Works in nodejs and browser.


Table of Contents


Install

npm i @neumatter/random-bytes


Usage

sync:

import randomBytes from '@neumatter/random-bytes'

const byteView = randomBytes(32)
// ...use byteView

callback:

import randomBytes from '@neumatter/random-bytes'

randomBytes(32, (err, byteView) => {
  if (err) {
    console.error(err)
  } else {
// ...use byteView
  }
})