Giter Site home page Giter Site logo

idcard's Introduction

下载 & 安装

该 Javascript 库 / 模块可以用于前端也可以用于后端 Nodejs 中。

  1. 直接下载idcard.js,然后使用 <script>标签引入,可以得到全局函数 idcard.

  2. 使用 npm 进行包管理,具体为:

    npm install idcard-tool

然后使用 require 引入模块

var idcard = require("idcard-tool");

// 居民身份证
console.log(idcard('11010519491231002X'));

返回

    {
        "type":"居民身份证",
        "country":"**",
        "sign":"北京市朝阳区",
        "birthday":"1949-12-31",
        "sex":"女",
        "isValid":false
    }
var idcard = require("idcard-tool");

// 外国人永久居留身份证
console.log(idcard('932682198501010017'));

返回

    {
        "type":"外国人永久居留身份证",
        "country":"沙特阿拉伯",
        "sign":"江苏省",
        "birthday":"1985-01-01",
        "sex":"男",
        "isValid":true
    }

idcard's People

Contributors

mumuy avatar

Stargazers

?x avatar 张剑™ avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.