Closed JonathanPorta closed 5 years ago
Thanks for the PR. It looks pretty straight-forward, and I cannot for the life of me remember why I put that. Only thing I can think of is that it was part of the actual Luhn algorithm definition. Regardless, I'll try and get this merged in and a new version of the NPM module pushed in the coming days.
Thanks again!
Merged into the main codebase. Update is a part of luhn package 2.4. Thanks again for the pull request!
Problem: passing the value
''
tovalidate()
results in a return value oftrue
.Solution: remove a length check that was returning
true
for a length of 0.NOTE: I was really trying to find a reason as to why you would want to return
true
for an empty string but I couldn't think of a reason. I concluded that this was possibly leftover code that was no longer needed. (git blame
showed it being added over four years ago)Thanks for publishing and maintaing a great helper library!