{"size": 224, "ext": "js", "max_stars_repo_path": "src/utilities/parseRedditPassback.js", "max_stars_repo_name": "Callmenorm/reddit-react-native", "max_stars_repo_stars_event_min_datetime": "2016-09-02T19:19:32.000Z", "max_stars_repo_stars_event_max_datetime": "2016-09-02T19:19:32.000Z", "max_issues_repo_path": "src/utilities/parseRedditPassback.js", "max_issues_repo_name": "Callmenorm/reddit-react-native", "max_issues_repo_issues_event_min_datetime": "2016-02-18T06:05:19.000Z", "max_issues_repo_issues_event_max_datetime": "2016-02-18T06:05:19.000Z", "max_forks_repo_path": "src/utilities/parseRedditPassback.js", "max_forks_repo_name": "Callmenorm/reddit-react-native", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 20.3636363636, "max_line_length": 51, "alphanum_fraction": 0.6517857143}
'use strict';

const parseRedditPassback = (url) => {
  const codeParam = url.split('&').filter(item => {
    return item.startsWith('code');
  });
  return codeParam[0].split('=')[1];
}

export default parseRedditPassback;
