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

Function randomNumber

TS_USER_AGENTS.ts:44–46  ·  view source on GitHub ↗

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

(min = 0, max = 100)

Source from the content-addressed store, hash-verified

42 * @param {number} max 最大值(不包含)
43 */
44function randomNumber(min = 0, max = 100) {
45 return Math.min(Math.floor(min + Math.random() * (max - min)), max);
46}
47const USER_AGENT = USER_AGENTS[randomNumber(0, USER_AGENTS.length)];
48
49export default USER_AGENT

Callers 1

TS_USER_AGENTS.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected