(mac: string)
| 64 | |
| 65 | /** 判断是否为 MAC 地址 */ |
| 66 | export const isMAC = (mac: string) => { |
| 67 | const reg = |
| 68 | /^(([a-f0-9][0,2,4,6,8,a,c,e]:([a-f0-9]{2}:){4})|([a-f0-9][0,2,4,6,8,a,c,e]-([a-f0-9]{2}-){4}))[a-f0-9]{2}$/i |
| 69 | return reg.test(mac) |
| 70 | } |
| 71 | |
| 72 | /** 判断是否为 IPv4 地址 */ |
| 73 | export const isIPv4 = (ip: string) => { |
nothing calls this directly
no outgoing calls
no test coverage detected