{"size": 286, "ext": "js", "max_stars_repo_path": "resources/js/_helpers/countInArray.js", "max_stars_repo_name": "kodinganyar/testd", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/js/_helpers/countInArray.js", "max_issues_repo_name": "kodinganyar/testd", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/js/_helpers/countInArray.js", "max_forks_repo_name": "kodinganyar/testd", "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": 19.0666666667, "max_line_length": 58, "alphanum_fraction": 0.6118881119}
/**
 * Counts the number of times a string appears in an array
 *
 * @param {Array} arr
 * @param {string} word
 * @return {number}
 */
export default function countInArray (arr, word) {
	let c = 0,
		i = arr.length;
	
	while (i--) if (arr[i].toLowerCase() === word) c++;
	
	return c;
}