Closed fanatid closed 7 years ago
Your isHexadecimal
does not return a boolean -- it returns the match
result (an array) if it finds a match, and null
otherwise. I think it should be:
function isHexadecimal(s) {
if (s.length % 2 === 0 && s.match(/^[0-9a-f]+$/i)) return true;
return false;
}
But, why do we want to discard the validator
library? Is it just to shrink the size, since validator has many other methods besides just isHexadecimal
and isBase64
?
Issue #23