'use strict';

/**
 * 移除元素的某个class类名
 * @param element HTML元素
 * @param className 类名
 *
 * @example
 * removeClass(someEl, 'hide')
 */
function removeClass(element, className) {
  if (!element || !element.classList) return;
  if (element.classList.contains(className)) element.classList.remove(className);
}

module.exports = removeClass;
