(domain: string)
| 28 | |
| 29 | /** 判断是否为域名(不带协议) */ |
| 30 | export const isDomain = (domain: string) => { |
| 31 | const reg = /^([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})$/ |
| 32 | return reg.test(domain) |
| 33 | } |
| 34 | |
| 35 | /** 判断版本号格式是否为 X.Y.Z */ |
| 36 | export const isVersion = (version: string) => { |
nothing calls this directly
no outgoing calls
no test coverage detected