Simple utility wrapper for generating randomness.
npm install @huth/randomMath.random as its random number generator. 1. npm install @huth/random
Default export contains all available methods:
``js`
import random from "@huth/random"
random.pick("Rose", "Blanche", "Dorothy", "Sophia") // "Dorothy"
- float(min: number, max: number): number inclusive random floatinteger(min: number, max: number): number
- inclusive random integerboolean(likelihood = .5): boolean
- boolean where likelihood is a number in the range [0, 1] increasing the chance of truepick
- returns a random element from the arguments providedid(): string
- generates an id via crypto.getRandomValues()`