snuxx-password
v1.0.2
Published
A utility to check password strength and generate secure random passwords
Downloads
7
Maintainers
Readme
🔐 snuxx-password
snuxx-password is a lightweight Node.js utility for:
- ✅ Checking password strength
- 🔄 Generating secure, random passwords with custom options
Perfect for login forms, account security checks, and password management tools.
📦 Installation
npm install snuxx-password🚀 Usage
const { checkStrength, generatePassword } = require('snuxx-password');✅ Check Password Strength
Use this function to evaluate how strong a given password is.
const result = checkStrength("P@ssw0rd123");
console.log(result);🧾 Output:
{
"score": 5,
"strength": "Strong",
"checks": {
"length": true,
"lowercase": true,
"uppercase": true,
"number": true,
"specialChar": true
}
}Strength levels:
Weak,Moderate,Strong
🔐 Generate a Random Password
Create a secure password with customizable options.
const password = generatePassword(16, {
numbers: true,
uppercase: true,
lowercase: true,
symbols: true
});
console.log(password); // e.g. "A@9bL0!xk$zWq2#M"🛠 Options:
| Option | Type | Default | Description |
|--------------|---------|---------|-------------------------------------|
| numbers | Boolean | true | Include digits 0–9 |
| uppercase | Boolean | true | Include uppercase A–Z |
| lowercase | Boolean | true | Include lowercase a–z |
| symbols | Boolean | true | Include special characters (!@#$%) |
📄 API Reference
checkStrength(password: string): object
Evaluates a given password and returns an object describing:
- Individual character-type checks
- Overall score (out of 5)
- Strength level:
Weak,Moderate, orStrong
generatePassword(length: number, options?: object): string
Generates a password of the desired length. Options object controls character types.
generatePassword(12, {
numbers: true,
uppercase: true,
lowercase: true,
symbols: false
});Returns a string like: aR2bXf9QsLp0
🛠 Development
git clone https://github.com/BhadraMohit09/snuxx-password
cd snuxx-password
npm install
npm test🪪 License
MIT © Bhadra Mohit
💬 Feedback & Issues
- GitHub Issues
- Pull requests welcome!
