Use better random number generation package
This commit is contained in:
parent
48ac343260
commit
44d0a8bcf7
|
@ -27,6 +27,7 @@
|
|||
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
||||
"@babel/plugin-transform-classes": "^7.5.5",
|
||||
"@babel/preset-env": "^7.5.4",
|
||||
"@nastyox/rando.js": "^2.0.5",
|
||||
"@types/cordova": "^0.0.34",
|
||||
"@types/filesystem": "^0.0.29",
|
||||
"ajv": "^6.10.2",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { T } from "../translations";
|
||||
import { rando } from "@nastyox/rando.js";
|
||||
|
||||
const bigNumberSuffixTranslationKeys = ["thousands", "millions", "billions", "trillions"];
|
||||
|
||||
|
@ -42,7 +43,7 @@ export function newEmptyMap() {
|
|||
* @param {number} end
|
||||
*/
|
||||
export function randomInt(start, end) {
|
||||
return Math.floor(Math.random() * (end - start + 1) + start);
|
||||
return rando(start, end);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1000,6 +1000,11 @@
|
|||
dependencies:
|
||||
core-js "^2.5.7"
|
||||
|
||||
"@nastyox/rando.js@^2.0.5":
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@nastyox/rando.js/-/rando.js-2.0.5.tgz#ecce9adb3251512016ae4d3baed6832679651a8a"
|
||||
integrity sha512-a7s3h4vnpCVEYT+W+mBc4ykmwtO29DnFQQR/X6YSbJ+YenAvpYBRCeUgEoPEWGlUS1Hbw1IWIsiIFVXw0g2QLw==
|
||||
|
||||
"@octokit/auth-token@^2.4.0":
|
||||
version "2.4.2"
|
||||
resolved "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz"
|
||||
|
|
Loading…
Reference in New Issue