incremental-dom-string

0.0.5 • Public • Published

Incremental DOM string

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:

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

<div>Hello world</div>

Readme

Keywords

none

Package Sidebar

Install

npm i incremental-dom-string

Weekly Downloads

434

Version

0.0.5

License

BSD-3-Clause

Unpacked Size

21.1 kB

Total Files

9

Last publish

Collaborators

  • jbalsas
  • mairatma
  • eduardolundgren