update for v 2.0.0
This commit is contained in:
7
util/index.js
Normal file
7
util/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
export function randomExtend (minNum, maxNum) {
|
||||
if (arguments.length === 1) {
|
||||
return parseInt(Math.random() * minNum + 1, 10)
|
||||
} else {
|
||||
return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user