Forger Help

String Settings

Five options control string generation: the length and which character groups participate in the charset.

Charset groups

A generated string is drawn from the union of the enabled groups:

Option

Default

Group

stringLowCase

true

abcdefghiklmnopqrstuvwxyz

stringUpCase

true

ABCDEFGHIJKLMNOPQRSTUVWXTZ

stringNumbers

true

0123456789

stringSpecial

true

~!@#$%^&*()_+-=[]\{}|;:'",./<>?

Disabling a group removes it from the pool:

const code = Forger.create<string>({ stringLength: 6, stringLowCase: false, stringUpCase: false, stringSpecial: false, })!; // '739204' — digits only
const slug = Forger.create<string>({ stringLength: 8, stringNumbers: false, stringSpecial: false, stringUpCase: false, })!; // 'akdmwotz' — lowercase letters only

Length

stringLength sets the exact length of every generated string (default 10). The value must not exceed what the enabled charset can provide when it needs to repeat — in practice any length works because the pool is cycled until it reaches stringLength:

const token = Forger.create<string>({ stringLength: 32, stringSpecial: false })!; // 32 characters from letters and digits

Scope

As with all settings, the options apply to every string in the call — nested objects, arrays, tuple positions, and function return values alike.

08 September 2026