function _(tag, childListOrString = [], attributeMap = {}) {
let e = document.createElement(tag);
attributeMap = addDefaults(attributeMap, { style: DEFAULT_STYLE });
e = Object.entries(attributeMap).reduce(function(e, [k, v]) {
if (typeof v === 'object') {
v = Object.entries(v)
.map(([k, v]) => `${k}: ${v}`)
.join('; ');
}
e.setAttribute(k, v);
return e;
}, e);
if (typeof childListOrString === 'string') {
e.appendChild(document.createTextNode(childListOrString));
return e;
}
return childListOrString.reduce(function(e, child) {
e.appendChild(child);
return e;
}, e);
}