text: module.exports = function check(str, bracketsConfig) {
      if (str.length%2!==0) {
        return false;
      }
      let i = str.length/2;
      while (i) {
          for (let pair of bracketsConfig) str = str.replace(pair.join(''), '');
          i--;
      }
      return !str;
  }
  
  