pattern
pattern<
S
>(patternStr
):Dependent
<string
>
Generates a string based on a pattern string.
Example
random(pattern('A#*a'))// => e.g. 'B5xq'
The pattern string can contain the following characters:
*
: any alphanumeric character#
: any digit (0-9)A
: any uppercase or lowercase alphabetical charactera
: any lowercase alphabetical characteri
: any alphabetical character (uppercase or lowercase)
Type Parameters
• S extends string
Parameters
patternStr
PatternString
<S
, S
>
The pattern string to generate the string from.
Returns
Dependent
<string
>
A Dependent<string>
that generates a string based on the pattern string.