2
1

feeds.ts 383 B

1234567891011121314151617181920212223
  1. import { exists } from './misc'
  2. function isValidRSSFeed (value: string) {
  3. if (!exists(value)) return false
  4. const feedExtensions = [
  5. 'xml',
  6. 'json',
  7. 'json1',
  8. 'rss',
  9. 'rss2',
  10. 'atom',
  11. 'atom1'
  12. ]
  13. return feedExtensions.indexOf(value) !== -1
  14. }
  15. // ---------------------------------------------------------------------------
  16. export {
  17. isValidRSSFeed
  18. }