1.0.20 • Published 1 year ago
random-password-generator-by-eric v1.0.20
Random Password Generator
A powerful library to generate random passwords with customizable options for Node.js and TypeScript environments.
Install
npm install random-password-generator-by-ericUsage
Start by importing the library:
const { generatePassword } = require('random-password-generator-by-eric');Generate a password using default options:
const password = generatePassword({ length: 12 });
console.log(`Generated Password: ${password}`);Customize to include uppercase, numbers, and symbols:
const customPassword = generatePassword({
length: 16,
includeUppercase: true,
includeNumbers: true,
includeSymbols: true
});
console.log(`Custom Generated Password: ${customPassword}`);Features
- Customizable Length: Specify the exact length of the password.
- Character Inclusion Options: Choose from uppercase, numbers, and symbols to include in the password.
API
generatePassword(options)Generates a random password based on the provided options.
Parameters:
options(Object):length(number): Length of the password.includeUppercase(boolean): Include at least one uppercase letter.includeNumbers(boolean): Include at least one number.includeSymbols(boolean): Include at least one symbol.
Returns:
- (string): The generated password.
Examples
Generate a simple password:
console.log(generatePassword({ length: 8 }));Generate a complex password:
console.log(generatePassword({
length: 20,
includeUppercase: true,
includeNumbers: true,
includeSymbols: true
}));License
ISC © Eric Kunin