chinese-idcard-parity
v1.0.0
Published
chinese-idcard-parity ===================== - 计算18位身份证最后一位校验码, 输入校验用
Downloads
4
Readme
chinese-idcard-parity
- 计算18位身份证最后一位校验码, 输入校验用
install
- npm install chinese-idcard-parity
usage
example
var {parse,calc_parity,MD} = require("chinese-idcard-parity")
calc_parity("130981199312253466")
> calc_parity("130981199312253466")
'X'
>
> parse("130981199312253466","X")
{ code: 0, msg: { parity: 'X' } }
>
> parse("130981199312253466","8")
{ code: 3, msg: {} }
> MD[3]
'parity-error'
>
LICENSE
- ISC