• How it Works
    
    export function passwordCheck(pass) {
        var score = 0;
        if (!pass) return score;
      
        // award every unique letter until 5 repetitions
        var letters = new Object();
        for (var i = 0; i < pass.length; i++) {
          letters[pass[i]] = (letters[pass[i]] || 0) + 1;
          score += 5.0 / letters[pass[i]];
        }
      
        // bonus points for mixing it up
        var variations = {
          digits: /d/.test(pass),
          lower: /[a-z]/.test(pass),
          upper: /[A-Z]/.test(pass),
          nonWords: /W/.test(pass),
        };
      
        var variationCount = 0;
        for (var check in variations) {
          variationCount += variations[check] == true ? 1 : 0;
        }
        score += (variationCount - 1) * 10;
      
        return parseInt(score);
      }
      
      export function checkPassStrength(pass) {
        var score = passwordCheck(pass);
        if (score > 80) return "Strong";
        if (score > 60) return "Good";
        if (score >= 30) return "Weak";
        return "";
      }
        
  • About the Paswword checker

    Today password strength is extremely important to keep your data secure. As web developers/designers we need a way to show our users the strength of their password. Here we provide a easiest way to check how strong your password really is. It comes with 3 tier such as strong , good and weak. Make sure your password is in the strong category. happy coding