# domguy

> generate dom trees from js

Latest version **0.1.5** (published 2021-06-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install domguy
pnpm add domguy
yarn add domguy
bun add domguy
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2021-06-30 |
| First published | 2021-06-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 2 |
| Unpacked size | 31.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | massivefermion |
| Keywords | dom, html, tree, structure, builder, build, template |

## Links

- npm: https://www.npmjs.com/package/domguy
- Repository: https://github.com/massivefermion/domguy
- Homepage: https://github.com/massivefermion/domguy#readme
- Issues: https://github.com/massivefermion/domguy/issues
- npm.io page: https://npm.io/package/domguy

## Dependencies (2)

- [d](https://npm.io/package/d.md) ^1.0.1
- [pretty](https://npm.io/package/pretty.md) ^2.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2021-06-30
- 0.1.4 — 2021-06-29
- 0.1.3 — 2021-06-29
- 0.1.2 — 2021-06-29
- 0.1.1 — 2021-06-29
- 0.1.0 — 2021-06-29

## README

# domguy

generate dom trees from js

## Install

`npm install domguy`

## Usage

```javascript
import { chainable, elements } from 'domguy'
import { writeFileSync } from 'fs'

const root = chainable({ prettify: true })
const { head, meta, title, body, div, h1 } = elements

const page = root
  .html(
    [
      head([
        meta({
          std: [['charset', 'UTF-8']],
        }),
        meta({
          std: [
            ['http-equiv', 'X-UA-Compatible'],
            ['content', 'IE=edge'],
          ],
        }),
        meta({
          std: [
            ['name', 'viewport'],
            ['content', 'width=device-width, initial-scale=1.0'],
          ],
        }),
        title('Document'),
      ]),
      body(
        [
          div(h1('Hello World!'), {
            std: [
              ['style', ['display:flex;', 'justify-content:space-between;']],
            ],
          }),
        ],
        {
          std: [['style', 'margin:128px;']],
        }
      ),
    ],
    {
      std: [['lang', 'en']],
      nstd: [['non-standard-attribute', 'value']],
    }
  )
  .toString()

writeFileSync('page.html', page, 'utf8')
```

---
_Source: https://npm.io/package/domguy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
