mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-29 03:53:59 -06:00
24 lines
377 B
TypeScript
24 lines
377 B
TypeScript
import { exists } from './misc'
|
|
|
|
function isValidRSSFeed (value: string) {
|
|
if (!exists(value)) return false
|
|
|
|
const feedExtensions = [
|
|
'xml',
|
|
'json',
|
|
'json1',
|
|
'rss',
|
|
'rss2',
|
|
'atom',
|
|
'atom1'
|
|
]
|
|
|
|
return feedExtensions.includes(value)
|
|
}
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export {
|
|
isValidRSSFeed
|
|
}
|