code: function hasClass(element, className) {
    if (!element || !('className' in element)) {
      return false;
    }
  
    return element.className.split(/\s+/).indexOf(className) !== -1;
  }
docs: Check if element has a class
  @param  {Element}  element
  @param  {String}  className
  @return {boolean}