{"size": 387, "ext": "js", "max_stars_repo_path": "test/fixtures/resistor-color-duo/400/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/400/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/400/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": 29.7692307692, "max_line_length": 105, "alphanum_fraction": 0.5736434109}
import { isArray } from "util";

const COLORS = ['black', 'brown', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'grey', 'white'];
export  function value(colourArray){
    if (isArray(colourArray)){
        let value=""
        for(let i=0;i<colourArray.length;i++){
            value+=COLORS.indexOf(colourArray[i])
        }
        return parseInt(value)
    }
    return -1
}