1.1.2 • Published 4 years ago

mzs-randomnumber v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Random Number Generator

This package will return a random number from the min to < max.

The function takes 3 parameters:

  • first parameter: minimum number you want the value to return
  • second parameter: maximum number in range, if you want 1 - 10 and wish to have the possible of 10, you would use (1, 11).
  • third parameter: is default to int=false, therefore it will return a decimal. If you want an integer, add the 3 parameter of true.

Installation

npm i mzs-randomnumber

Usage

  • const randomNumGenerator = require('mzs-randomnumber')
  • randomNumGenerator(minNumber, maxNumber) Returns a decimal
  • randomNumGenerator(minNumber, maxNumber, true) Returns an integer

Tests

Run node test.js and ensure the first number is decimal and the second is integer.

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago