解析中国身份证号码(地址,性别,生日,星座),支持 18 位和 15 位身份证
Usage
使用示例:
var parse_id = require('parse-cn-idcard');
var result = parse_id('37010219940709292X');
console.log(result);
输出结果:
{
"area": {
"id": "370102",
"name": "山东省济南市历下区"
},
"birthday": {
"date": "19940709",
"constellation_cn": "巨蟹座",
"constellation_en": "Cancer"
},
"gender": {
"cn": "女",
"en": "Female"
}
}