password-strength-meter-2
v0.0.4
Published
A simple library to evaluate the strength of passwords.
Downloads
9
Maintainers
Readme
password-strength-meter-2
A simple library to evaluate the strength of passwords.
Installation
To install password-strength-meter-2
, use the following command:
npm install password-strength-meter-2
Usage
Import the evaluatePasswordStrength
function and use it to get a score for your password:
const { evaluatePasswordStrength } = require('password-strength-meter-2');
const password = "YourPassword123!";
const score = evaluatePasswordStrength(password);
console.log(score); // The score will be between 0 and 5 based on the password strength
The score is calculated based on the presence of lowercase letters, uppercase letters, digits, special characters, and the length of the password. A higher score indicates a stronger password.