Skip to content
On this page

random

ts
function random(str: string): string

Returns a random character of the string.

Example

ts
str.random('') // ''
str.random('a') // 'a'
str.random('Rafael') // 'R' | 'a' | 'f' | 'a' | 'e' | 'l'