react-randomizer

1.0.6 • Public • Published

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
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.6
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.6
    2
  • 1.0.5
    0
  • 1.0.3
    0

Package Sidebar

Install

npm i react-randomizer

Weekly Downloads

2

Version

1.0.6

License

ISC

Last publish

Collaborators

  • kevintamarus