Skip to content

randomAlpha ​

Generates a random alphabetic string.

randomAlpha ​

Signature ​

typescript
function randomAlpha(length: number): string

Parameters ​

  • length - The length of the string to generate

Returns ​

Random string containing only letters.

Examples ​

typescript
import { randomAlpha } from 'strio'

randomAlpha(10)
// "aBcDeFgHiJ" (random letters)

See Also ​

Released under the MIT License.