src/utilities/dom-class-list/index.js
function contains( element, className ) {
  className = className.replace( '.', '' );
  if ( hasClassList ) {
    return element.classList.contains( className );
  }

  return element.className.indexOf( className ) > -1;
}
function contains( element, className ) {
  className = className.replace( '.', '' );
  if ( hasClassList ) {
    return element.classList.contains( className );
  }

  return element.className.indexOf( className ) > -1;
}
function contains ( element , className ) { className = className . replace ( '.' , '' ) ; if ( hasClassList ) { return element . classList . contains ( className ) ; } return element . className . indexOf ( className ) > - 1 ; }
Determine if element has particular CSS class.

@param {HTMLNode} element - A DOM element.
@param {string} className - CSS selector.
@returns {boolean} True if `element` contains class `className`.
Determine if element has particular CSS class .