(ip: string)
| 71 | |
| 72 | /** 判断是否为 IPv4 地址 */ |
| 73 | export const isIPv4 = (ip: string) => { |
| 74 | const reg = |
| 75 | /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/ |
| 76 | return reg.test(ip) |
| 77 | } |
| 78 | |
| 79 | /** 判断是否为车牌(兼容新能源车牌) */ |
| 80 | export const isLicensePlate = (str: string) => { |
nothing calls this directly
no outgoing calls
no test coverage detected