Skip to content

Commit

Permalink
Fixing coverage report for isStrongPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
renanmontebelo committed Mar 6, 2021
1 parent c9db7f1 commit 7fdf04a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/lib/isStrongPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function analyzePassword(password) {
symbolCount: 0,
};
Object.keys(charMap).forEach((char) => {
/* istanbul ignore else */
if (upperCaseRegex.test(char)) {
analysis.uppercaseCount += charMap[char];
} else if (lowerCaseRegex.test(char)) {
Expand Down
14 changes: 7 additions & 7 deletions validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,7 @@ function elGrCheck(tin) {
checksum += digits[i] * Math.pow(2, 8 - i);
}

return checksum % 11 === digits[8];
return checksum % 11 % 10 === digits[8];
}
/*
* en-GB validation function (should go here if needed)
Expand Down Expand Up @@ -3867,7 +3867,7 @@ var phones = {
'tr-TR': /^(\+?90|0)?5\d{9}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-6|89]))|(9([0-9])))([0-9]{7})$/,
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?1([3568][0-9]|4[579]|6[67]|7[01235678]|9[012356789])[0-9]{8}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
};
Expand Down Expand Up @@ -4539,12 +4539,11 @@ function isLicensePlate(str, locale) {
return validators$1[locale](str);
} else if (locale === 'any') {
for (var key in validators$1) {
if (validators$1.hasOwnProperty(key)) {
var validator = validators$1[key];
/* eslint guard-for-in: 0 */
var validator = validators$1[key];

if (validator(str)) {
return true;
}
if (validator(str)) {
return true;
}
}

Expand Down Expand Up @@ -4603,6 +4602,7 @@ function analyzePassword(password) {
symbolCount: 0
};
Object.keys(charMap).forEach(function (_char2) {
/* istanbul ignore else */
if (upperCaseRegex.test(_char2)) {
analysis.uppercaseCount += charMap[_char2];
} else if (lowerCaseRegex.test(_char2)) {
Expand Down
3 changes: 1 addition & 2 deletions validator.min.js

Large diffs are not rendered by default.

0 comments on commit 7fdf04a

Please sign in to comment.