A file with utility methods for introducing randomness.
Install with npm install rando-js --save
.
Use cases:
const Random = ; // Simulate a coinflipif Random /* something that has ~50% chance of happening */ // Roll a stat for your D&D characterconst charisma = Random // anything from 3 to 18const d20 = Random // default args are 1, 20. // Get something from an arrayconst choice = Random // a, b, c, or d // Get a random number in a rangeconst under20 = Random