{"size": 732, "ext": "js", "max_stars_repo_path": "src/client/lib/bml/toplevelops.js", "max_stars_repo_name": "dfogas/greyzone", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/client/lib/bml/toplevelops.js", "max_issues_repo_name": "dfogas/greyzone", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/client/lib/bml/toplevelops.js", "max_forks_repo_name": "dfogas/greyzone", "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": 30.5, "max_line_length": 116, "alphanum_fraction": 0.6721311475}
/* ImmutableList -> String
  Returns name of level of operations of organization
  BML: true
*/

function topLevelOps(enhancements) {
  const enhancementnames = enhancements.filter(enh => enh.get('type') === 'capability').map(enh => enh.get('name'));

  if (enhancementnames.indexOf('Top Class') !== -1)
    return 'Top Class';
  else if (enhancementnames.indexOf('Higher Level') !== -1)
    return 'Higher Level';
  else if (enhancementnames.indexOf('Good Label') !== -1)
    return 'Good Label';
  else if (enhancementnames.indexOf('Operation II.') !== -1)
    return 'Operation II.';
  else if (enhancementnames.indexOf('Operation I.') !== -1)
    return 'Operation I.';
  else
    return 'Basic';
}

export default topLevelOps;
