deanilvincent/check-password-strength

index.js:32 Error: Password is empty.

Closed this issue · 2 comments

an error with empty string

image

Hi @MedinaGitHub ,

Yep, there's a condition in this package that throws Error if the password is empty :)

if (!password) {
throw new Error("Password is empty.");
}

I would suggest, for now, is to create an condition that checks if your input password is empty or not. :)

if(inputPass){
    console.log(passwordStrength(inputPass).value);
}

yes, maybe it is better to return 0, if not the app crashes.