# incremental-dom-string

> Ability to render Incremental DOM virtual elements into strings on the server and the client.

Latest version **0.0.5** (published 2020-10-07) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install incremental-dom-string
pnpm add incremental-dom-string
yarn add incremental-dom-string
bun add incremental-dom-string
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2020-10-07 |
| First published | 2017-06-07 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eduardo Lundgren |
| Maintainers | jbalsas, mairatma, eduardolundgren |

## Links

- npm: https://www.npmjs.com/package/incremental-dom-string
- Repository: metal/metal-plugins/tree/master/packages/incremental-dom-string
- npm.io page: https://npm.io/package/incremental-dom-string

## Dependencies (1)

- [xss-filters](https://npm.io/package/xss-filters.md) ^1.2.7

## Recent versions

- 0.0.5 (latest) — 2020-10-07
- 0.0.4 — 2018-09-26
- 0.0.3 — 2018-09-25
- 0.0.2 — 2017-06-08
- 0.0.1 — 2017-06-07

## README

# Incremental DOM string

![](https://d3vv6lp55qjaqc.cloudfront.net/items/1l3o1p3n1l3P3e38391X/ics.gif)

## Setup

```
npm install --save incremental-dom-string
```

## Usage

The string to be rendered is described with the incremental node functions, `elementOpen`, `elementClose` and `text`. For example, the following function:

```js
var IncrementalDOM = require('incremental-dom-string');

const output = IncrementalDOM.renderToString(() => {
  IncrementalDOM.elementOpen('div');
    IncrementalDOM.text('Hello world');
  IncrementalDOM.elementClose('div');
});

console.log(output);
```
where `output` would correspond to

```html
<div>Hello world</div>
```

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