npm.io
1.2.2 • Published 7 years ago

dombat

Licence
MIT
Version
1.2.2
Deps
1
Size
28 kB
Vulns
0
Weekly
0

dombat

Install

From NPM:
npm install dombat

From GitHub:
npm install xist/dombat

Example

import { html, head, title, body, div, p } from "dombat";
// import * as tag from "dombat"; <-- or you can do this

const dom = html(
  head(title("Example DOM")),
  body(div(p("This is an example paragraph inside a div.")))
);

The output of dom.getHTML() would be:

<html>
  <head>
    <title>Example DOM</title>
  </head>
  <body>
    <div>
      <p>This is an example paragraph inside a div.</p>
    </div>
  </body>
</html>
Contribute

Pull requests are encouraged.