MCPcopy Create free account
hub / github.com/Semporia/Scripts / randomNumber

Function randomNumber

jd_superMarket.js:1811–1813  ·  view source on GitHub ↗

* 生成随机数字 * @param {number} min 最小值(包含) * @param {number} max 最大值(不包含)

(min = 0, max = 100)

Source from the content-addressed store, hash-verified

1809 * @param {number} max 最大值(不包含)
1810 */
1811function randomNumber(min = 0, max = 100) {
1812 return Math.min(Math.floor(min + Math.random() * (max - min)), max);
1813}
1814
1815function jsonParse(str) {
1816 if (typeof str == "string") {

Callers 1

businessCircleActivityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected