{"size": 273, "ext": "js", "max_stars_repo_path": "src/components/App/helpers.js", "max_stars_repo_name": "tomzmtl/smash-picker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/App/helpers.js", "max_issues_repo_name": "tomzmtl/smash-picker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/App/helpers.js", "max_forks_repo_name": "tomzmtl/smash-picker", "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": 22.75, "max_line_length": 52, "alphanum_fraction": 0.641025641}
import { FIGHTERS } from '../../common/fighters';
import { random } from '../../common/array';


export const pickRandomFighter = (index) => {
  if (index) {
    return FIGHTERS[index];
  }
  const fighters = FIGHTERS.filter(f => f.pickable);
  return random(fighters);
};
