virtual-dom-stringify

2019-08-24

Stringify virtual-dom trees into HTML.

virtual-dom-stringify

NPM versionNPM DownloadsBuild StatusTips

Stringify virtual-domtrees 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

ParamTypeDescription
nodeVirtualNode
parentVirtualNode
[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]Booleanencode 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-stringifyrepository!

Tests

Run tests using npm test.

Support

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

HomePage

https://github.com/alexmingoia/virtual-dom-stringify

Repository

https://github.com/alexmingoia/virtual-dom-stringify


上一篇:virtual-html
下一篇:百度ecahrts和swiper一起使用,loop复制slide导致图表不展示的问题解决
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部