This library was specially made for randomNess in javascript, these tools are included:
-randomNumber(max)
-numberBetween(min, max)
-randomColor
-randomFromArray(arrayname)
-randomEmoji
-randomLetterString(length)
These tools will all be explained below:
this one is pretty straight forward, you can use it like:
let chosenNumber = randomNumer(10)
for example. Please note the number CANNOT be ne negative.
This creates a random number inbetween two numbers, these CAN be negative. example:
let chosenNumber = randomNumberX(-10, 10)
This is also a really simple function, example:
let color = randomColor()
this returns a random rgb color
this basicly is a shortcut which is used to return a random object from an array of your choice, example:
const options = ["hi", "hello", "bye"];
let chosen = randomFromArray(options)
this will give you one of the three options out of the array
also pretty straight forward, returns an emoji from a set built-in array, not unicode, just an emoji, example:
let emoji = randomEmoji()
thats it.
this returns a random letter string with a length of your choice, example:
let letterString = randomLetterString(5)
this function returns a random string that has both letters and numbers, for example:
let password = randomString(6)
Even though its really simple for a library, it does what it's supposed to do, more features might be added later.