{"size": 395, "ext": "js", "max_stars_repo_path": "test/fixtures/resistor-color-duo/197/resistor-color-duo.js", "max_stars_repo_name": "crashb/javascript-analyzer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/fixtures/resistor-color-duo/197/resistor-color-duo.js", "max_issues_repo_name": "crashb/javascript-analyzer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/fixtures/resistor-color-duo/197/resistor-color-duo.js", "max_forks_repo_name": "crashb/javascript-analyzer", "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": 28.2142857143, "max_line_length": 104, "alphanum_fraction": 0.546835443}
const COLORS = ["black", "brown", "red", "orange", "yellow", "green", "blue", "violet", "grey", "white"]

export const value = (selectedColors) => {
  let result = ''

  for (let i = 0; i < selectedColors.length; i++) {
    for (let j = 0; j < COLORS.length; j++) {
      if (selectedColors[i] === COLORS[j]) {
        result = result + j.toString()
      }
    }
  }
  return parseInt(result)
}