# virtual-dom-stringify

> Stringify virtual-dom trees into HTML.

Latest version **3.0.1** (published 2015-03-08) · BSD license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install virtual-dom-stringify
pnpm add virtual-dom-stringify
yarn add virtual-dom-stringify
bun add virtual-dom-stringify
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2015-03-08 |
| First published | 2014-06-30 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Alex Mingoia |
| Maintainers | amingoia |
| Keywords | virtual-dom, html, stringify, parse, vtree, vnode, vdom-virtualize |

## Links

- npm: https://www.npmjs.com/package/virtual-dom-stringify
- Repository: https://github.com/alexmingoia/virtual-dom-stringify
- Issues: https://github.com/alexmingoia/virtual-dom-stringify/issues
- npm.io page: https://npm.io/package/virtual-dom-stringify

## Dependencies (5)

- [he](https://npm.io/package/he.md) ^0.5.0
- [param-case](https://npm.io/package/param-case.md) ^1.1.1
- [virtual-dom](https://npm.io/package/virtual-dom.md) ^2.0.1
- [svg-attributes](https://npm.io/package/svg-attributes.md) ^1.0.0
- [html-attributes](https://npm.io/package/html-attributes.md) ^1.1.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2015-03-08
- 3.0.0 — 2015-03-08
- 2.1.0 — 2015-02-17
- 2.0.3 — 2015-02-17
- 2.0.2 — 2015-02-12
- 2.0.1 — 2015-02-10
- 2.0.0 — 2015-02-10
- 1.0.6 — 2015-01-30
- 1.0.5 — 2015-01-30
- 1.0.4 — 2015-01-08
- 1.0.2 — 2015-01-07
- 1.0.1 — 2015-01-05
- 1.0.0 — 2014-11-30
- 0.11.0 — 2014-11-19
- 0.10.0 — 2014-11-19
- … 11 more at https://npm.io/package/virtual-dom-stringify/versions

## README

# virtual-dom-stringify

[![NPM version](http://img.shields.io/npm/v/virtual-dom-stringify.svg?style=flat)](https://npmjs.org/package/virtual-dom-stringify) [![NPM Downloads](https://img.shields.io/npm/dm/virtual-dom-stringify.svg?style=flat)](https://npmjs.org/package/virtual-dom-stringify) [![Build Status](http://img.shields.io/travis/alexmingoia/virtual-dom-stringify.svg?style=flat)](http://travis-ci.org/alexmingoia/virtual-dom-stringify) [![Tips](https://img.shields.io/gratipay/alexmingoia.svg?style=flat)](https://www.gratipay.com/alexmingoia/)

> Stringify [virtual-dom][0] trees into HTML. For parsing DOM nodes into a
virtual-dom tree use [vnode-virtualize][1].

## Deprecated

This module is deprecated. Use
[vdom-to-html](https://github.com/nthtran/vdom-to-html/).

## Installation

Using [npm](https://www.npmjs.org/):

```sh
npm install --save virtual-dom-stringify
```

Using [bower](http://bower.io/):

```sh
bower install --save virtual-dom-stringify
```

## API Reference
<a name="exp_module_virtual-dom-stringify--module.exports"></a>
### module.exports(node, parent, [options]) ⇒ <code>String</code> ⏏
Stringify given virtual dom tree and return html.

**Kind**: Exported function

| Param | Type | Description |
| --- | --- | --- |
| node | <code>VirtualNode</code> |  |
| parent | <code>VirtualNode</code> |  |
| [options] | <code>Object</code> |  |
| [options.selfClosingTags] | <code>Array.&lt;String&gt;</code> | tags that are self-closing |
| [options.attributes] | <code>Object.&lt;String, String&gt;</code> | map of attribute names where keys are camelCased name and values are the HTML attribute name. |
| [options.asciiSafe] | <code>Boolean</code> | encode non-ASCII symbols (default: false) |

**Example**
```javascript
var VirtualNode = require('vtree/vnode');
var stringify = require('virtual-dom-stringify');

stringify(new VirtualNode('div'));
// => "<div></div>"
```
## Contributing

Please submit all issues and pull requests to the [alexmingoia/virtual-dom-stringify](http://github.com/alexmingoia/virtual-dom-stringify) repository!

## Tests

Run tests using `npm test`.

## Support

If you have any problem or suggestion please open an issue [here](https://github.com/alexmingoia/virtual-dom-stringify/issues).

[0]: https://github.com/Matt-Esch/virtual-dom/
[1]: https://github.com/marcelklehr/vdom-virtualize/

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