Skip to content

Commit

Permalink
Improve readability of if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Jan 10, 2024
1 parent 24aff5b commit 6a68335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/PasswordStrength.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PasswordStrength {
count.upperCase += 1;
} else if (characters[i].match(/[0-9]/g)) {
count.numbers += 1;
} else if (characters[i].match(/[^a-z]/)) {
} else if (!characters[i].match(/[a-z]/)) {
// Count everything else that is not a lowercase letter as a symbol
count.symbols += 1;
}
Expand Down

0 comments on commit 6a68335

Please sign in to comment.