1.0.1 • Published 3 months ago
fragmentbuilder v1.0.1
Javascript object to HTML fragment
This allows you to create a HTML fragment from a javascript object.
example
const obj = {
tag: 'div',
text: 'Hello, World!',
attr: {
class: 'container',
id: 'main'
},
childs: [
{
tag: 'h1',
text: 'Hello, World!'
},
]
}
const fragment = fragmentBuilder(obj);