packages/heml-styles/src/plugins/postcss-element-expander/tagAliasSelectors.js
function targetsTag (selector) {
  const selectors = simpleSelectorParser.process(selector).res

  return selectors.filter((selector) => {
    let selectorNodes = selector.nodes.concat([]).reverse() // clone the array

    for (const node of selectorNodes) {
      if (node.type === 'cominator') { break }

      if (node.type === 'tag') { return true }
    }

    return false
  }).length > 0
}
function targetsTag (selector) {
  const selectors = simpleSelectorParser.process(selector).res

  return selectors.filter((selector) => {
    let selectorNodes = selector.nodes.concat([]).reverse() // clone the array

    for (const node of selectorNodes) {
      if (node.type === 'cominator') { break }

      if (node.type === 'tag') { return true }
    }

    return false
  }).length > 0
}
function targetsTag ( selector ) { const selectors = simpleSelectorParser . process ( selector ) . res return selectors . filter ( ( selector ) => { let selectorNodes = selector . nodes . concat ( [ ] ) . reverse ( ) // clone the array for ( const node of selectorNodes ) { if ( node . type === 'cominator' ) { break } if ( node . type === 'tag' ) { return true } } return false } ) . length > 0 }
checks if selector targets a tag
@param  {String} selector the selector
@return {Boolean}         if the selector targets a tag
checks if selector targets a tag