Skip to content

kevintamarus/react-randomizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

React Randomizer

https://www.npmjs.com/package/react-randomizer

Install

npm install --save react-randomizer

Information

Randomizer.randomNumber(num1, num2): generates a random number between num1 and num2

Randomizer.randomizeArray(arr): shuffles the input array in a random order

Randomizer.rollDice(): gives you a random number between 2-12(probability is consistent with rolling two dice)

Example Use Cases

import Randomizer from 'react-randomizer';

Randomizer.randomNumber(1,100) // => generates a random number between 1 and 100

Randomizer.randomizeArray([1,2,3,4,5]) // => [5,3,2,4,1]

Randomizer.rollDice() // => generates a random number between 2-12

About

npm package: randomizer modules and functions for javascript/react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published