{"size": 477, "ext": "js", "max_stars_repo_path": "app/lib/personname.js", "max_stars_repo_name": "stpe/slack-forecast-checkin", "max_stars_repo_stars_event_min_datetime": "2016-01-12T12:01:03.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-05T06:53:30.000Z", "max_issues_repo_path": "app/lib/personname.js", "max_issues_repo_name": "stpe/slack-forecast-checkin", "max_issues_repo_issues_event_min_datetime": "2016-01-27T08:11:20.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-28T21:35:36.000Z", "max_forks_repo_path": "app/lib/personname.js", "max_forks_repo_name": "stpe/slack-forecast-checkin", "max_forks_repo_forks_event_min_datetime": "2016-04-07T13:57:59.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-05T06:53:34.000Z"}
{"max_stars_count": 12, "max_issues_count": 5, "max_forks_count": 9, "avg_line_length": 28.0588235294, "max_line_length": 97, "alphanum_fraction": 0.6624737945}
"use strict";

// this is the place to change to change format of how person names are printed

module.exports = (person, people) => {
  // check if there is someone else with the same first name
  let useLongFormat = people.some(p => p.first_name === person.first_name && p.id !== person.id);

  if (useLongFormat) {
    // name long format
    return `*${person.first_name} ${person.last_name.slice(0, 1)}*`;
  }

  // name short format
  return `*${person.first_name}*`;
};
