rename 'boot:windows' to 'boot:win'; install 'run-script-os' with '--save-dev'.

This commit is contained in:
陆柯 2022-09-13 11:49:13 +08:00
parent a077f95b23
commit dc834c8157

View File

@ -968,7 +968,7 @@ class TicCrypto {
*/ */
static randomize_number ({ length, min, max } = {}) { static randomize_number ({ length, min, max } = {}) {
// 长度为 length 的随机数字,或者 (min||0) <= num < max // 长度为 length 的随机数字,或者 (min||0) <= num < max
var num = 0 let num = 0
if (typeof length === 'number' && length > 0) { if (typeof length === 'number' && length > 0) {
num = parseInt(Math.random() * Math.pow(10, length)) num = parseInt(Math.random() * Math.pow(10, length))
num = this.padStart(num.toString(), length, '0') num = this.padStart(num.toString(), length, '0')