Skip to content

randomString

Generate a random alphanumeric string of a specified length.

Usage

ts
import { randomString } from 'rattail'

randomString() // Generates a random string of length 10
randomString(30) // Generates a random string of length 30

Arguments

ArgTypeDefaults
lengthnumber10

Return

Type
string