mirror of
https://github.com/iptv-org/iptv
synced 2026-05-06 17:47:13 -04:00
Update utils.ts
This commit is contained in:
@@ -18,7 +18,7 @@ import fs from 'node:fs'
|
|||||||
export function isURI(string: string): boolean {
|
export function isURI(string: string): boolean {
|
||||||
try {
|
try {
|
||||||
const url = new URL(string)
|
const url = new URL(string)
|
||||||
return /^(http:|https:|mmsh:|rtsp:|rtmp:|srt:|rtp:|udp:)/.test(url.protocol)
|
return /^(http:|https:|mms:|mmsh:|rtsp:|rtmp:|srt:|rtp:|udp:)/.test(url.protocol)
|
||||||
} catch {
|
} catch {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user