Trường · Numeric
Trường · Numeric · string.numeric. Phương thức tạo · Ví dụ
string.numeric
Cài đặt trình tạo
Tạo dữ liệu để xem kết quả ở đây.
Tham số & Ví dụ
Generates a given length string of digits.
string.numeric(options?: number | { length?: NumberOrRange; allowLeadingZeros?: boolean; exclude?: ReadonlyArray<LiteralUnion<NumericChar>> | string; })- options
- Either the length of the string to generate or the optional options object.
- options.length
- The length of the string to generate either as a fixed length or as a length range. Defaults to 1.
- options.allowLeadingZeros
- Whether leading zeros are allowed or not. Defaults to true.
- options.exclude
- An array of digits which should be excluded in the generated string. Defaults to [].
Ví dụ
"6"Dùng dữ liệu tổng hợp trong môi trường kiểm thử.