1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00
Peertube/server/core/helpers/custom-validators/feeds.ts
2023-10-04 15:13:25 +02:00

23 lines
380 B
TypeScript

import { exists } from './misc.js'
function isValidRSSFeed (value: string) {
if (!exists(value)) return false
const feedExtensions = [
'xml',
'json',
'json1',
'rss',
'rss2',
'atom',
'atom1'
]
return feedExtensions.includes(value)
}
// ---------------------------------------------------------------------------
export {
isValidRSSFeed
}