mirror of
https://github.com/iptv-org/iptv
synced 2026-10-21 18:46:20 -04:00
Update utils.ts
This commit is contained in:
1 parent
850a6beeb8
commit
e79445e28d
1 file changed
+2
-2
+2
-2
@@ -2,8 +2,8 @@ import normalizeUrl from 'normalize-url'
|
||||
|
||||
export function isURI(string: string): boolean {
|
||||
try {
|
||||
new URL(string)
|
||||
return true
|
||||
const url = new URL(string)
|
||||
return /^(http:|https:|mmsh:|rtsp:|rtmp:)/.test(url.protocol)
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user