{"size": 269, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "calguzman/decode-bearer-token", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/index.js", "max_issues_repo_name": "calguzman/decode-bearer-token", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/index.js", "max_forks_repo_name": "calguzman/decode-bearer-token", "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": 22.4166666667, "max_line_length": 48, "alphanum_fraction": 0.624535316}

module.exports = (bearerToken) =>  {
  if(!bearerToken){
    throw new Error('The Token is Missing');
  }
  if(bearerToken.indexOf('Bearer ') ===  -1){
    throw new Error('Token Invalid Format');
  }
  let token = bearerToken.replace('Bearer ','');
  return token;
}
