Skip to content

maichong/number-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#number-random

Generate random number in a range

Installation

number-random is available as an npm package.

npm i number-random

Example

const random = require('number-random');

random(0,1);     // 0 or 1
random(1);       // 0 or 1
random(100);     // 0~100
random(100,999); // 100~999
random(100,999,true);   //663.7264946557116
random(100,999,4);      //346.5673
random(0,1,true);       //0.1557056098245
random();               //0.3497616536915302

Contribute

Maichong Cloud

Liang Xingchen

License

This project is licensed under the terms of the MIT license

About

Generate random number in a range

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published