Socket
Socket
Sign inDemoInstall

incremental-dom-string

Package Overview
Dependencies
152
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    incremental-dom-string

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


Version published
Weekly downloads
1K
increased by1.39%
Maintainers
3
Install size
269 kB
Created
Weekly downloads
 

Readme

Source

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>

FAQs

Last updated on 07 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc