china-id-card

China citizen identification number

Usage no npm install needed!

<script type="module">
  import chinaIdCard from 'https://cdn.skypack.dev/china-id-card';
</script>

README

china-id-card - 中国公民身份证验证工具

Gitpod ready-to-code Build Status tested with jest semantic-release license

Usage

ONLINE DEMO

ES6 Modules

import IDCard from 'china-id-card';

console.log(IDCard('xxxxxxx').isVerified);

CommonJS

const IDCard = require('china-id-card');

console.log(IDCard.default('xxxxxxx').isVerified);

AMD

require(['path/to/amd.file.js'], function(IDCard) {
  console.log(IDCard.default('xxxxxxx').isVerified);
});

License

Copyright © 2017-present. This source code is licensed under the MIT license found in the LICENSE file.


Made by Tony (blog)