1.0.0 • Published 2 years ago

@achaljhawar/password-generator v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

A simple npm package that generates a random password with a specified length and complexity.

To install the package, simply run the following command:

npm install @achaljhawar/password-generator

Just use the 'generatePassword' method, with the appropriate password length and complexity, to begin using the package.

const generatePassword = require('@achaljhawar/password-generator');

const password = generatePassword(10, true, true); // Generates a password with a length of 10 that contains lowercase and uppercase characters, numbers, and special characters.

console.log(password); // Output: "Fp#n9XZ7dK"

The generatePassword function takes in three optional parameters:

Here are some examples of how you can use the generatePassword function:

const generatePassword = require('@achaljhawar/password-generator');

const password1 = generatePassword(); // Generates a password with the default options (length of 8 that contains lowercase and uppercase characters, numbers, and special characters).

const password2 = generatePassword(12); // Generates a password with a length of 12 that contains lowercase and uppercase characters, numbers, and special characters.

const password3 = generatePassword(16, false, true); // Generates a password with a length of 16 that contains only lowercase and uppercase characters and special characters.

console.log(password1); // Output: "h@Q9XtLz"
console.log(password2); // Output: "Vp*Yt#n7lO$a"
console.log(password3); // Output: "cvW$zGxOyP%qTjK"

If you find any bugs or issues with the package, please feel free to submit an issue or pull request on the GitHub repository.

1.0.0

2 years ago