Global

Members

defaultCharts

Source:

Methods

random(max, minopt) → {number}

生成一个区间内的随机数
Parameters:
Name Type Attributes Description
max number 最大值
min number <optional>
最小值
Source:
Returns:
this value between the max and min;
Type
number

randomStr(lenopt) → {string}

生成包含[a-zA-Z0-9]的指定长度的随机字符串
Parameters:
Name Type Attributes Description
len number <optional>
指定长度,默认为 10;
Source:
Returns:
this string include the [a-z0-9] and length is len
Type
string

randomStrLimit(len, chartsopt) → {string}

生成包含charts指定集合内字符的指定长度的随机字符串
Parameters:
Name Type Attributes Description
len number 指定长度,默认为 10;
charts charts <optional>
指定长度,默认为 10;
Source:
Returns:
Type
string