@hexlet/html-builder
v0.1.6
Published
[![github action status](https://github.com/hexlet-components/js-html-builder/workflows/Node%20CI/badge.svg)](../../actions)
Downloads
5
Keywords
Readme
js-html-builder
Install
npm install @hexlet/html-builder
Usage example
import parse from '@hexlet/html-builder';
const data = ['html', [
['head', [
['title', 'hello, hexlet!'],
]],
['body', [
['div', { class: 'separator' }],
['h1', { class: 'header' }, 'html builder example'],
['div', [
['img', { class: 'image', href: '#' }],
['span', 'span text2'],
]],
]],
]];
const ast = parse(data);
ast.toString();
// '<html>
// <head><title>hello, hexlet!</title></head>
// <body><div class="separator"></div>
// <h1 class="header">html builder example</h1>
// <div><img class="image" href="#"><span>span text2</span>
// </div></body></html>'
For more information, see the Full Documentation
This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet (in Russian).
See most active contributers on hexlet-friends.