Members
Methods
-
random(max, minopt) → {number}
-
生成一个区间内的随机数
Parameters:
Name Type Attributes Description maxnumber 最大值 minnumber <optional>
最小值 Returns:
this value between the max and min;- Type
- number
-
randomStr(lenopt) → {string}
-
生成包含[a-zA-Z0-9]的指定长度的随机字符串
Parameters:
Name Type Attributes Description lennumber <optional>
指定长度,默认为 10; Returns:
this string include the [a-z0-9] and length is len- Type
- string
-
randomStrLimit(len, chartsopt) → {string}
-
生成包含charts指定集合内字符的指定长度的随机字符串
Parameters:
Name Type Attributes Description lennumber 指定长度,默认为 10; chartscharts <optional>
指定长度,默认为 10; Returns:
- Type
- string