Cryptographically-secure password generator written in Typescript with zero dependencies.
See how it's implemented at my blog post.
npm i pswd-generator
import generatePassword, { charsets } from 'pswd-generator';
const password = generatePassword(
24,
charsets.NUMBERS + charsets.LOWERCASE + charsets.UPPERCASE + charsets.SYMBOLS,
);
console.log(password);
// A:_X`h%&:eto5d8i?bFZmOAU
generatePassword(24, 'ABCDEFG');