setUnitAttr = (elem, attr, val) => {
  elem.setAttribute(attr, val)
}
Sets an element's attribute based on the unit in its current value.

@function module:units.setUnitAttr
@param {Element} elem - DOM element to be changed
@param {string} attr - Name of the attribute associated with the value
@param {string} val - Attribute value to convert
@returns {void}