viewof build = frepr(function build(
{ append, classed, text, style, call, property, each, ...attributes },
group
) {
function prepare(group) {
const _el = group.append(append).call(attrs, attributes);
if (classed) _el.classed(classed, true);
if (text) _el.text(text);
if (style) styles(_el, style);
if (property) properties(_el, property);
if (call) {
if (Array.isArray(call)) calls(_el, call);
else call(_el);
}
if (each) {
if (Array.isArray(each)) eachs(_el, each);
else each(_el);
}
return _el;
}
return group ? prepare(group) : prepare;
})