text: module.exports = function check(str, bracketsConfig) {
    let checkStr = "";
    for (let i = 0; i < str.length; i++) {
      for (let element of bracketsConfig) {
        if (
          str[i] === element[1] &&
          checkStr[checkStr.length - 1] === element[0]
        ) {
          checkStr = checkStr.slice(0, checkStr.length - 1);
        } else if (str[i] === element[0]) {
          checkStr += str[i];
        } else if (str[i] === element[1]) {
          checkStr += str[i];
        }
      }
    }
    if (checkStr.length === 0) {
      return true;
    } else {
      return false;
    }
  };
  