{"size": 273, "ext": "js", "max_stars_repo_path": "build/util/validPort.js", "max_stars_repo_name": "xunzhaotech/aotoo-hub", "max_stars_repo_stars_event_min_datetime": "2018-08-28T10:07:12.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-13T19:49:11.000Z", "max_issues_repo_path": "build/util/validPort.js", "max_issues_repo_name": "lhxktxwd/aotoo-hub", "max_issues_repo_issues_event_min_datetime": "2021-01-06T08:16:51.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-27T10:48:38.000Z", "max_forks_repo_path": "build/util/validPort.js", "max_forks_repo_name": "lhxktxwd/aotoo-hub", "max_forks_repo_forks_event_min_datetime": "2018-12-25T11:40:28.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-30T08:46:48.000Z"}
{"max_stars_count": 77, "max_issues_count": 3, "max_forks_count": 19, "avg_line_length": 21.0, "max_line_length": 46, "alphanum_fraction": 0.673992674}
const portOccupied = require('./portOccupied')

function* validPort(port, step) {
  const portUsed = yield portOccupied(port)
  if (portUsed) {
    port += 30
    return yield validPort(port, step)
  } else {
    return { validPort: port }
  }
}

module.exports = validPort