Cryptographically secure random number generator using `/dev/urandom` with fallback to node's `crypto` and finally to `window.crypto || window.mscrypto`.
Homepage Repository npm Download
Cryptographically secure random number generator using /dev/urandom
with fallback to node's crypto
and finally to window.crypto || window.mscrypto
.
npm i guld-random
curl https///bitbucket.org/guld/tech-js-node_modules-guld-random/raw/guld/guld-random.min.js -o guld-random.min.js
// get random buffer of length 100
var buff = await getRandBuffer(100)
// get random, alphanumeric (default) string of length 100
var str = await getRandStr(100)
// get random, alphanumeric + special string of length 100
var str = await getRandStr(100, 'all')
// get random number less than or equal to 100
var num = await getRandInt(100)
const { getHaystack, getRandBuffer, getRandStr, getRandInt } = require('guld-random')
MIT Copyright isysd