1.0.5 • Published 5 months ago

@neumatter/random-bytes v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

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
  }
})