UNPKG

get-random-values-polypony

Version:

Synchronous randombytes function that works in node, the browser & react-native!

1 lines 244 B
const crypto=require("crypto"),getRandomValuesNodeLt8=require("./node-randomBytes.js");module.exports=function getRandomValuesRandomFillUint8(input){return input instanceof Uint8Array?crypto.randomFillSync(input):getRandomValuesNodeLt8(input)};