# component-domify

> turn HTML into DOM elements

Latest version **1.2.2** (published 2014-02-11) · 0 weekly downloads

## Install

```sh
npm install component-domify
pnpm add component-domify
yarn add component-domify
bun add component-domify
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2014-02-11 |
| First published | 2014-02-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 262 |
| Author | TJ Holowaychuk |
| Maintainers | tootallnate |
| Keywords | dom, html, client, browser, component |

## Links

- npm: https://www.npmjs.com/package/component-domify
- Repository: https://github.com/component/domify
- Issues: https://github.com/component/domify/issues
- npm.io page: https://npm.io/package/component-domify

## 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

- 1.2.2 (latest) — 2014-02-11

## README

# domify

> Turn a HTML string into DOM elements, cross-platform

## Usage

Works out of the box in the browser:

```js
import domify from 'domify';

document.addEventListener('DOMContentLoaded', () => {
	const element = domify('<p>Hello <em>there</em></p>');
	document.body.appendChild(element);
});
```

You can also run it in Node.js and other non-browser environments by passing a custom implementation of `document`:

```js
import {JSDOM} from 'jsdom';

const jsdom = new JSDOM();

domify('<p>Hello <em>there</em></p>', jsdom.window.document);
```

**Note:** For browser-only use, prefer [`DOMParser.parseFromString()`](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString).

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