Socket
Socket
Sign inDemoInstall

chinese-idcard-parity

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chinese-idcard-parity

chinese-idcard-parity ===================== - 计算18位身份证最后一位校验码, 输入校验用


Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 08 Mar 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc