(str: string)
| 46 | |
| 47 | /** 判断是否为手机号(1 开头) */ |
| 48 | export const isPhoneNumber = (str: string) => { |
| 49 | const reg = /^(?:(?:\+|00)86)?1\d{10}$/ |
| 50 | return reg.test(str) |
| 51 | } |
| 52 | |
| 53 | /** 判断是否为第二代身份证(18 位) */ |
| 54 | export const isChineseIdCard = (str: string) => { |
nothing calls this directly
no outgoing calls
no test coverage detected