(path: string)
| 10 | |
| 11 | /** 判断是否为外链 */ |
| 12 | export const isExternal = (path: string) => { |
| 13 | const reg = /^(https?:|mailto:|tel:)/ |
| 14 | return reg.test(path) |
| 15 | } |
| 16 | |
| 17 | /** 判断是否为网址(带协议) */ |
| 18 | export const isUrl = (url: string) => { |
nothing calls this directly
no outgoing calls
no test coverage detected