0.0.15 • Published 2 years ago
generate-simple-password v0.0.15
Generate simple passwords with 1 function
Examples Usage:
import generatePassword from "generate-simple-password";
const password = generatePassword({
addUppercase: true,
addLowercase: true,
addSpecialChars: true,
});
console.log(password); // ^fBN{y{&'poi;xfM
import generatePassword from "generate-simple-password";
const password = generatePassword({
customChars: "123ABC",
});
console.log(password); // 2BC311B3111A3A12
Parameters:
options
- Object
:
length
- length of the password. Default is set to16
addUppercase
- settrue
if you want password to contain uppercase letters. Default isfalse
addLowercase
- settrue
if you want password to contain lowercase letters. Default isfalse
addNumbers
- settrue
if you want password to contain numbers. Default isfalse
addSpecialChars
- settrue
if you want password to contain special characters. Default isfalse
customChars
- provide a string if you want to create password out of your own set of characters
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.