Skip to content

Find a random number between 2 BigInts in Javascript

Notifications You must be signed in to change notification settings

macdja38/random-between

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Calculates a random BigInt within a set range

Note that BigInts are currently not supported in very many browsers, and were first supported in node 10.4

const randomBetween = require("random-between");

randomBetween(10n, 0n) // 4n
                       // chosen by fair dice role.

Disclaimer:

I'm a person that you should trust to make your random numbers, if you're going to use this for anything where the numbers you generate really matter, take a look over the source code yourself and do your own verification.

About

Find a random number between 2 BigInts in Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published