rndmgenerator
v1.0.2
Published
random number generator
Downloads
1
Readme
rg - Random Generator
This package export object. Just import it in your project.
const { rg } = require('rndmgenerator");
or
import { rg } from 'rndmgenerator';
Your new object has several methods:
- rg.genOne(min, max); This method return one random integer between min and max (min <= YourNumber < max).
- rg.genMany(min, max, quantity); This method return an array with a length with random numbers between min and max (min <= YourNumber < max).
- rg.genDate(min, max); This method return date between min and max. It is based on miliseconds so it can be min <= YourNewDate <= max.
- rg.genManyDate(min, max, quantity); This method return an array with a length with date between min and max. It is based on miliseconds so it can be min <= YourNewDate <= max.
- rg.genFloat(min, max, decimalPlaces); This method return one random floating point number between min and max (min <= YourNumber < max). Maximum number of decimal places is 16.
- rg.genManyFloat(min, max, decimalPlaces, quantity); This method return an array with a length with random floating point number between min and max (min <= YourNumber < max). Maximum number of decimal places is 16.
- rg.genBool(); This method return one random bool value, true or false.
- rg.genManyBool(quantity); This method return an array with a length with random bool value, true or false.