{"size": 503, "ext": "js", "max_stars_repo_path": "lib/objectify-selector.js", "max_stars_repo_name": "jjdejong/zenbot", "max_stars_repo_stars_event_min_datetime": "2017-05-23T08:47:50.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-25T14:50:31.000Z", "max_issues_repo_path": "lib/objectify-selector.js", "max_issues_repo_name": "jjdejong/zenbot", "max_issues_repo_issues_event_min_datetime": "2017-12-28T15:01:42.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-23T14:50:34.000Z", "max_forks_repo_path": "lib/objectify-selector.js", "max_forks_repo_name": "jjdejong/zenbot", "max_forks_repo_forks_event_min_datetime": "2017-12-28T17:57:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T17:10:51.000Z"}
{"max_stars_count": 5871, "max_issues_count": 928, "max_forks_count": 1806, "avg_line_length": 23.9523809524, "max_line_length": 96, "alphanum_fraction": 0.62027833}
var normalizeSelector = require('./normalize-selector')
module.exports =  function(selector) {
  var rtn

  if (typeof selector == 'string') {
    var s = normalizeSelector(selector)

    var e_id = s.split('.')[0]
    var p_id = s.split('.')[1]
    var asset = p_id.split('-')[0]
    var currency = p_id.split('-')[1]

    rtn = {exchange_id: e_id, product_id: p_id, asset: asset, currency: currency, normalized: s}
  } 
  else if (typeof selector == 'object') {
    rtn = selector
  }

  return rtn
}
