boast-init
Version:
The initialisation script for the boast product
18 lines (16 loc) • 443 B
JavaScript
;
exports.__esModule = true;
var build = function build(element, attributes, text) {
var ele = document.createElement(element);
if (attributes && attributes.length > 0) {
attributes.forEach(function (att) {
if (att.name && att.value) {
ele.setAttribute(att.name, att.value);
}
});
}
if (text) ele.innerHTML = text;
return ele;
};
exports.default = build;
module.exports = exports["default"];