npm.io
1.0.3 • Published 7 years ago

random-await

Licence
ISC
Version
1.0.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
1

random

Get random numbers based on your settings.

NPM Build Status JavaScript Style Guide

Install

npm install --save random-await

Usage

const random = require('random-await')

// quick start
random(min, max, digit)
random(2, 3) // [2, 3), get 2.56
random(2, 3, 5) // [2, 3), get 2.56789



// normal
random({
    min: 2, //min number
    max: 3, //max number
    digit: 5, //decimal digits
    left: true, //contain min number
    right: false //not contain max number
})


License

MIT stephen

Keywords