@tempots/std
randomString() function
Returns a random substring from the value
argument. The length of such value is by default 1
.
Signature:
randomString: (value: string, length?: number) => string
Parameters
Parameter |
Type |
Description |
---|---|---|
value |
string |
The string to extract the random substring from. |
length |
number |
(Optional) The length of the random substring to extract. |
Returns: string
The random substring.