{"size": 455, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "bolzand/brackets", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/index.js", "max_issues_repo_name": "bolzand/brackets", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/index.js", "max_forks_repo_name": "bolzand/brackets", "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": 67, "alphanum_fraction": 0.567032967}
module.exports = function check(str, bracketsConfig) {
  const config = {};
  for (let i = 0; i < bracketsConfig.length; i++){
    let element = bracketsConfig[i];
    config[element[1]] = element[0];
  }

  let stack = [];
  for (let i = 0; i< str.length; i++){
    let symbol = str[i];
    if (stack.length && config[symbol] == stack[stack.length - 1]){
      stack.pop();
    } else {
      stack.push(symbol);
    }
  }

  return stack.length == 0;
}
