0.1.2 • Published 6 years ago

@mojule/dom-node-to-html-string v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

dom-node-to-html-string

Small utility to get an HTML string from any DOM node, because different node types have different ways of turning themselves into HTML strings, eg there is no innerHTML on DocumentFragment, Text and Comment nodes use .nodeValue etc

npm install @mojule/dom-node-to-html-string

const HtmlString = require( '@mojule/dom-node-to-html-string' )

// ... code to get node here

console.log( HtmlString( node ) )