{"size": 436, "ext": "js", "max_stars_repo_path": "src/utils/index.js", "max_stars_repo_name": "tusharpandey13/express-mongoose-boilerplate", "max_stars_repo_stars_event_min_datetime": "2021-07-08T05:55:38.000Z", "max_stars_repo_stars_event_max_datetime": "2021-07-08T05:55:38.000Z", "max_issues_repo_path": "src/utils/index.js", "max_issues_repo_name": "tusharpandey13/express-mongoose-boilerplate", "max_issues_repo_issues_event_min_datetime": "2020-09-25T05:13:37.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-25T05:13:37.000Z", "max_forks_repo_path": "src/utils/index.js", "max_forks_repo_name": "tusharpandey13/express-mongoose-boilerplate", "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": 22.9473684211, "max_line_length": 93, "alphanum_fraction": 0.6559633028}
//this also stops someone scrolling back and viewing sensitive data that may have been logged
export const clearConsoleAndScrollbackBuffer = () => {
  process.stdout.write('\u001b[3J\u001b[2J\u001b[1J');
  console.clear();
};

export const normalizePort = val => {
  const port = parseInt(val, 10);
  if (isNaN(port)) {
    // named pipe
    return val;
  }
  if (port >= 0) {
    // port number
    return port;
  }
  return false;
};
