number-random
v1.0.0
Published
Generate random number in a range
Downloads
143
Readme
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
License
This project is licensed under the terms of the MIT license