xmlParseAttrs = elem => {
  const attrs = elem.attributes
  const data = {}
  forEach(attrs, attr => {
    let attrVal = attrs[attr].value || ''
    if (attrVal.match(/false|true/g)) {
      attrVal = attrVal === 'true'
    } else if (attrVal.match(/undefined/g)) {
      attrVal = undefined
    }

    if (attrVal) {
      data[camelCase(attrs[attr].name)] = attrVal
    }
  })

  return data
}
Convert html element attributes to key/value object
@private
@param  {Element} elem DOM element
@return {Object} ex: {attrName: attrValue}