function hasClass (elem, clst) {
  let cls = elem.className || ''
  if (!cls || typeof cls !== 'string') {
    return false
  }
  cls = ' ' + cls.split(/\s+/).join(' ') + ' '
  const reg = new RegExp(' ' + clst + ' ')
  return reg.test(cls)
}
has css class
@param elem
@param clst
@returns {boolean}