number-random

1.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    60
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    60
  • 0.1.1
    1
  • 0.1.0
    0

Package Sidebar

Install

npm i number-random

Weekly Downloads

54

Version

1.0.0

License

MIT

Last publish

Collaborators

  • liangxingchen