@hexlet/html-builder

0.1.6 • Public • Published

js-html-builder

github action status

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

Hexlet Ltd. logo

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @hexlet/html-builder

Weekly Downloads

0

Version

0.1.6

License

ISC

Unpacked Size

21.8 kB

Total Files

10

Last publish

Collaborators

  • dzencot
  • grozwalker
  • mshkv
  • mokevnin
  • corsicanec82