mirror of
https://github.com/iptv-org/iptv
synced 2026-03-22 03:41:39 -04:00
Update utils.ts
This commit is contained in:
@@ -2,8 +2,8 @@ import normalizeUrl from 'normalize-url'
|
|||||||
|
|
||||||
export function isURI(string: string): boolean {
|
export function isURI(string: string): boolean {
|
||||||
try {
|
try {
|
||||||
new URL(string)
|
const url = new URL(string)
|
||||||
return true
|
return /^(http:|https:|mmsh:|rtsp:|rtmp:)/.test(url.protocol)
|
||||||
} catch {
|
} catch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user