lib/index.js
function parseSelector(selector = '') {
  const tagMatch = selector.match(/^[a-zA-Z0-9='"[\]_-]*/g)
  const classNamesMatch = selector.match(/\.[a-zA-Z0-1_-]*/g)

  return {
    tag: tagMatch ? tagMatch[0] : undefined,
    classNames: classNamesMatch ? classNamesMatch.map(cname => cname.substr(1)) : []
  }
}
function parseSelector(selector = '') {
  const tagMatch = selector.match(/^[a-zA-Z0-9='"[\]_-]*/g)
  const classNamesMatch = selector.match(/\.[a-zA-Z0-1_-]*/g)

  return {
    tag: tagMatch ? tagMatch[0] : undefined,
    classNames: classNamesMatch ? classNamesMatch.map(cname => cname.substr(1)) : []
  }
}
function parseSelector ( selector = '' ) { const tagMatch = selector . match ( / ^[a-zA-Z0-9='"[\]_-]* / g ) const classNamesMatch = selector . match ( / \.[a-zA-Z0-1_-]* / g ) return { tag : tagMatch ? tagMatch [ 0 ] : undefined , classNames : classNamesMatch ? classNamesMatch . map ( cname => cname . substr ( 1 ) ) : [ ] } }
Parse tag and classNames from given selector, if any are specified

@param  {?String} selector
@return {Object}
Parse tag and classNames from given selector if any are specified