{"size": 780, "ext": "js", "max_stars_repo_path": "scripts/reg_val.js", "max_stars_repo_name": "suli-g/ci-react-deploy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "scripts/reg_val.js", "max_issues_repo_name": "suli-g/ci-react-deploy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scripts/reg_val.js", "max_forks_repo_name": "suli-g/ci-react-deploy", "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": 33.9130434783, "max_line_length": 118, "alphanum_fraction": 0.5935897436}
const error_template = "{regex} | missing {missing}"; //could be modified to fit any error in...
const error = (regex, missing) => error_template.replace(/({regex})|({missing})/g, (match, r, m, offset, string) => {
	if (r) return regex;
	if (m) return missing;
})

const test_cases = new Map(); 
	test_cases.set(/(^[^()\s]+)/, "a left template tag")
	test_cases.set(/(\))/, "a right parenthesis")
	test_cases.set(/(\([^()]+\))/, "a capture group")
	test_cases.set(/(\()/, "a left parenthesis")
	test_cases.set(/([^()\s]+$)/, "a right template tag");

exports.reg_val = (regex, g) =>{
	let responses =[];
	test_cases.forEach((missing, check)=>{
  		if (!check.test(regex)) {
  			responses.push([g,`${error(regex, missing)}`]);
  		}
	})
	return responses;
}
