« get me outta code hell

crawlers.js « src - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src/crawlers.js
blob: 5ad7fb407779bdec751d47301975767e35f3464b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict'

module.exports = {
  getCrawlerByName: function(name) {
    switch (name) {
      case 'crawl-http': return require('./crawl-http')
      case 'crawl-local': return require('./crawl-local')
      case 'crawl-itunes': return require('./crawl-itunes')
      case 'crawl-youtube': return require('./crawl-youtube')
      default: return null
    }
  }
}