Last active
May 20, 2018 15:54
-
-
Save d0mmie/7a95b5ab822695a3945818f0da7ee083 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Verifier = idText => { | |
return (11 - (idText.slice(0, 12).split('').map((val, key) => parseInt(val) * (13 - key)).reduce((current, total) => total + current) % 11)).toString().slice(-1) === idText[12] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment