@trallerds/password-strength-checker
v2.0.1
Published
Security-focused password strength analysis for Node.js and TypeScript
Maintainers
Readme
Password Strength Checker
Security-focused password strength analysis for Node.js and TypeScript.
Install
npm install @trallerds/password-strength-checkerUsage
import { checkPassword } from "@trallerds/password-strength-checker";
const result = await checkPassword("MinhaSenha123!");
console.log(result.level); // "WEAK"
console.log(result.score); // 42
console.log(result.issues); // [...]
console.log(result.recommendations); // [...]Response
{
score: number;
level: "VERY_WEAK" | "WEAK" | "FAIR" | "STRONG" | "VERY_STRONG";
entropyBits: number;
estimatedGuesses: number;
compromised: boolean;
issues: Array<{
type: string;
severity: "critical" | "high" | "medium" | "low" | "info";
message: string;
}>;
recommendations: string[];
}API
checkPassword(password: string): Promise<PasswordAnalysis>
Runs the full analysis pipeline:
- Length analysis
- Character set variety
- Repetition detection
- Sequential character detection
- Keyboard pattern detection
- Dictionary / common password detection
- Date and year pattern detection
- Breach detection
Server
npm run devThen:
curl -X POST http://localhost:3000/password/strength \
-H "Content-Type: application/json" \
-d '{"password":"P@ssword2026!"}'License
ISC
