Function randomStringBuilder

  • Generate a random string with fine control over letters, numbers & symbols

    Parameters

    • length: number

      length of generated string

    • letters: boolean = false

      Add letters to pool

    • numbers: boolean = false

      Add numbers to pool

    • symbols: boolean = false

      Add symbols to pool

    Returns string

    generated string

    const randomLetter = randomString(1, true);
    const randomChar = randomString(1, true, true, true);