function createElement(name, attrs) {
  const element = document.createElement(name)

  for (const attr in attrs) {
    element.setAttribute(attr, attrs[attr])
  }

  return element
}
Create DOM node, set attributes.

@param {String} name
@param {Object} [attrs]
@return Element