|
|
|
@ -101,7 +101,7 @@ export const isClient = !isServer;
@@ -101,7 +101,7 @@ export const isClient = !isServer;
|
|
|
|
|
|
|
|
|
|
export function isUrl(path: string): boolean { |
|
|
|
|
const reg = |
|
|
|
|
/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/; |
|
|
|
|
/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_{\s\S}]*)#?(?:[\w]*))?)$/; |
|
|
|
|
return reg.test(path); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|