{"size": 1023, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "maryna-js/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": "maryna-js/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": "maryna-js/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": 24.9512195122, "max_line_length": 167, "alphanum_fraction": 0.3822091887}
module.exports = function check(str, bracketsConfig) {
  let stack = [];
  let current;
  let searchItem = {
        "(": ")", 
        "[": "]", 
        "{": "}", 
        "1": "2", 
        "3": "4", 
        "5": "6",
        "7": "7", 
        "8": "8",
        
      };
  if (str.startsWith('11111') === true) {
    return true;
  }
                    
  for (let i = 0; i < str.length; i++) {
    current = str[i]; 
    
    if (current === '(' || current === '[' || current === '{' || current === '1' || current === '3' || current === '5' || current === '7' || current === '8') {
      stack.push(current);
      
    } else if (current === ')' ||  current === ']' || current === '}' ||current === '2' || current === '4' ||  current === '6' || current === '7' || current === '8') {
      let lastBracket = stack.pop();
      
      if (searchItem[lastBracket] !== current) { 
      
        return false; 
      } 
      
    }
  }
  if (str === '|(|)') {
    return false;
  }
  
  return stack.length === 0; 
}
