code: function(element, className) {
      invariant(
        !/\s/.test(className),
        'CSS.hasClass takes only a single class name.'
      );
      if (element.classList) {
        return !!className && element.classList.contains(className);
      }
      return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
    }
docs: Tests whether the element has the class specified.
  
  @param {DOMNode|DOMWindow} element the element to check the class on
  @param {string} className the CSS className
  @return {boolean} true if the element has the class, false if not