Skip to content

Instantly share code, notes, and snippets.

View monoblaine's full-sized avatar

Serhan Apaydın monoblaine

View GitHub Profile
@monoblaine
monoblaine / validate.js
Last active March 28, 2016 09:17 — forked from ssg/validate.js
Turkish ID Validator in a Tweet Attempt
tc=n=>{if(n=n.split('').map(Number),o=n[e=i=0],c=n[9],t=10,o)for(;++i<9;)eval((i%2?'e':'o')+'+=n[i]');return!((7*o-e+t)%t-c|(o+e+c)%t-n[t])}