Skip to content

About

A library made for giving creators the tools to make randomness in project far easier with tools like randomFromArray, randomColor or randomEmoji

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

RandomNess js

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:

randomNumber(max)

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.

numberBetween(min, max)

This creates a random number inbetween two numbers, these CAN be negative. example:

let chosenNumber = randomNumberX(-10, 10)

randomColor()

This is also a really simple function, example:

let color = randomColor()

this returns a random rgb color

randomFromArray(arrayname)

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

randomEmoji()

also pretty straight forward, returns an emoji from a set built-in array, not unicode, just an emoji, example:

let emoji = randomEmoji()

thats it.

randomLetterString(length)

this returns a random letter string with a length of your choice, example:

let letterString = randomLetterString(5)

randomString(length)

this function returns a random string that has both letters and numbers, for example:

let password = randomString(6)

conclusion

Even though its really simple for a library, it does what it's supposed to do, more features might be added later.

About

A library made for giving creators the tools to make randomness in project far easier with tools like randomFromArray, randomColor or randomEmoji

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages