code: function getAttrs(element) {
    return Array.from(element.attributes).reduce((attrs, attr) => {
      attrs[attr.name] = attr.value;
      return attrs;
    }, {});
  }
docs: Get the attributes of an HTML element.
  @param {HTMLElement} element
  @returns {Object}