{"size": 595, "ext": "js", "max_stars_repo_path": "app/scripts.babel/helpers.js", "max_stars_repo_name": "fosron/switchytube", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/scripts.babel/helpers.js", "max_issues_repo_name": "fosron/switchytube", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/scripts.babel/helpers.js", "max_forks_repo_name": "fosron/switchytube", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.75, "max_line_length": 97, "alphanum_fraction": 0.5411764706}
var detectType = function detectType(url){
  var url = (!url) ? (document.location.pathname + document.location.search).toLowerCase() : url;
  var page = null;

  if (url == '/') {
    page = 'index';
  } else if (url == '/feed/subscriptions') {
    page = 'feed';
  } else if (url.match(/(\&|\?)v=([a-zA-Z0-9\-_]+)/) !== null) {
    page = 'watch';
  } else if (url.match(/(\&|\?)list=([a-zA-Z0-9\-_]+)/)) {
    page = 'playlist';
  } else if (url.match(/^\/(channel|user|u|c)\/([a-z0-9\-\_]+)(\/featured)?$/) !== null) {
    page = 'channel';
  }

  return page;
};

export default detectType;