提交 bec2bb35 编写于 作者: DCloud_JSON's avatar DCloud_JSON

Update check-id-card.uts

上级 9eaedc84
function checkIdCard (idCardNumber: string): boolean {
if (typeof idCardNumber !== 'string' || idCardNumber.length !== 18) return false
if (typeof idCardNumber != 'string' || (idCardNumber.length as number) != 18) return false
const coefficient = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
const checkCode = [1, 0, 'x', 9, 8, 7, 6, 5, 4, 3, 2]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册