lib/rules/no-duplicate-attributes.js
function groupByName(attrs) {
            const attributes = new Map()
            for (const node of attrs) {
                const name = node.key
                const list =
                    attributes.get(name) ||
                    (() => {
                        const a = []
                        attributes.set(name, a)
                        return a
                    })()
                list.push(node)
            }
            return attributes
        }
function groupByName(attrs) {
            const attributes = new Map()
            for (const node of attrs) {
                const name = node.key
                const list =
                    attributes.get(name) ||
                    (() => {
                        const a = []
                        attributes.set(name, a)
                        return a
                    })()
                list.push(node)
            }
            return attributes
        }
function groupByName ( attrs ) { const attributes = new Map ( ) for ( const node of attrs ) { const name = node . key const list = attributes . get ( name ) || ( ( ) => { const a = [ ] attributes . set ( name , a ) return a } ) ( ) list . push ( node ) } return attributes }
Group by attribute name
@param  {Array} attrs The attribute nodes
@returns {Map} The grouping Map
Group by attribute name