* 生成随机数字 * @param {number} min 最小值(包含) * @param {number} max 最大值(不包含)
(min = 0, max = 100)
| 1809 | * @param {number} max 最大值(不包含) |
| 1810 | */ |
| 1811 | function randomNumber(min = 0, max = 100) { |
| 1812 | return Math.min(Math.floor(min + Math.random() * (max - min)), max); |
| 1813 | } |
| 1814 | |
| 1815 | function jsonParse(str) { |
| 1816 | if (typeof str == "string") { |
no outgoing calls
no test coverage detected