code: function hasClass ( el, className ) {
          return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className);
      }
docs: https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/