{"size": 469, "ext": "js", "max_stars_repo_path": "index.js", "max_stars_repo_name": "johndcarmichael/four-letter-number", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "index.js", "max_issues_repo_name": "johndcarmichael/four-letter-number", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "index.js", "max_forks_repo_name": "johndcarmichael/four-letter-number", "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": 33.5, "max_line_length": 90, "alphanum_fraction": 0.6481876333}
module.exports = (input, inRange) => {
  inRange = inRange || 5000
  const regex = RegExp(/^[a-zA-Z]{4}$/)
  if (!regex.test(input)) {
    throw new Error('four-letter-number expects the input to be 4 letters, got: ' + input)
  }
  const alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('')
  let port = 0
  input.toLowerCase().split('').forEach((t) => {
    port += Number(Object.keys(alphabet)[Object.values(alphabet).indexOf(t)])
  })
  return Number(inRange) + port
}
