JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 118
  • Score
    100M100P100Q18185F
  • License BSD

Stringify virtual-dom trees into HTML.

Package Exports

  • virtual-dom-stringify

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (virtual-dom-stringify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

virtual-dom-stringify

NPM version NPM Downloads Build Status Tips

Stringify virtual-dom trees into HTML. For parsing DOM nodes into a virtual-dom tree use vnode-virtualize.

Deprecated

This module is deprecated. Use vdom-to-html.

Installation

Using npm:

npm install --save virtual-dom-stringify

Using bower:

bower install --save virtual-dom-stringify

API Reference

module.exports(node, parent, [options]) ⇒ String

Stringify given virtual dom tree and return html.

Kind: Exported function

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

Example

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 repository!

Tests

Run tests using npm test.

Support

If you have any problem or suggestion please open an issue here.