Skip to content

password

password(length?, options?): string

Defined in: src/token.ts:102

A random password. With requireEach the result holds at least one character from every enabled class, then gets shuffled so their positions are random.

number = 16

PasswordOptions = {}

string

password(); // "vK8mQ2xL9pT4nR7c"
password(24, { symbols: true, requireEach: true });
password(12, { uppercase: false, symbols: false });