mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update rand.js
This commit is contained in:
parent
f0e5197e92
commit
a59d5210d5
|
@ -12,6 +12,10 @@ function getInt(min, max) {
|
|||
return Math.floor(randomize() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
function getSeed() {
|
||||
return getInt(10000000, 99999999);
|
||||
}
|
||||
|
||||
function one(arr) {
|
||||
return arr[getInt(0, arr.length - 1)];
|
||||
}
|
||||
|
@ -105,6 +109,7 @@ function discardOne(arr, filename) {
|
|||
|
||||
exports.randomize = randomize;
|
||||
exports.getInt = getInt;
|
||||
exports.getSeed = getSeed;
|
||||
exports.one = one;
|
||||
exports.makeString = makeString;
|
||||
exports.uuidv4 = uuidv4;
|
||||
|
@ -114,6 +119,6 @@ exports.sample = sample;
|
|||
exports.discardOne = discardOne;
|
||||
exports.discardCallback = discardCallback;
|
||||
|
||||
exports.VERSIONINFO = "Random Module (rand.js) version 0.5";
|
||||
exports.VERSIONINFO = "Random Module (rand.js) version 0.6";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user