src/generators/template/bindings/tag.js
function groupSlots(sourceNode) {
  return getChildrenNodes(sourceNode).reduce((acc, node) => {
    const slotAttribute = findSlotAttribute(node)

    if (slotAttribute) {
      acc[slotAttribute.value] = node
    } else {
      acc.default = createRootNode({
        nodes: [...getChildrenNodes(acc.default), node]
      })
    }

    return acc
  }, {
    default: null
  })
}
function groupSlots(sourceNode) {
  return getChildrenNodes(sourceNode).reduce((acc, node) => {
    const slotAttribute = findSlotAttribute(node)

    if (slotAttribute) {
      acc[slotAttribute.value] = node
    } else {
      acc.default = createRootNode({
        nodes: [...getChildrenNodes(acc.default), node]
      })
    }

    return acc
  }, {
    default: null
  })
}
function groupSlots ( sourceNode ) { return getChildrenNodes ( sourceNode ) . reduce ( ( acc , node ) => { const slotAttribute = findSlotAttribute ( node ) if ( slotAttribute ) { acc [ slotAttribute . value ] = node } else { acc . default = createRootNode ( { nodes : [ ... getChildrenNodes ( acc . default ) , node ] } ) } return acc } , { default : null } ) }
Find the slots in the current component and group them under the same id
@param   {RiotParser.Node.Tag} sourceNode - the custom tag
@returns {Object} object containing all the slots grouped by name
Find the slots in the current component and group them under the same id