0.0.2 • Published 6 years ago
@marcomag/html-js v0.0.2
html.js (unreleased)
html generator from js object
No more HTML strings in your javascript code! ##Install npm
npm install html-js
yarn
yarn add html-js
Example
const djs = [
{_: 'div', boundedValue:'{{myBoundedValue}}', $:[
'some text',
{_:'customTag', cass:['bold', 'italic']}
]}
]
let result = htmljs(djs);
console.log('result');
that prints
<body class="my-body" bounded-value="{{myBoundedValue}}">
someText
<custom-tag class="bold italic"></custom-tag>
</body>