Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hemanth/dom-to-string

Cross browser, DOM to String.
https://github.com/hemanth/dom-to-string

dom

Last synced: 2 months ago
JSON representation

Cross browser, DOM to String.

Awesome Lists containing this project

README

        

# dom-to-string

[![Build Status](https://travis-ci.org/hemanth/dom-to-string.svg)](https://travis-ci.org/hemanth/dom-to-string) [![npm version](https://badge.fury.io/js/dom-to-string.svg)](http://badge.fury.io/js/dom-to-string)
> Cross browser DOM to String converter.

## Installation

`npm install dom-to-string --save`

## Usage

```js
const dom2str = require('dom-to-string');

var p = document.createElement('p');
p.innerHTML = "hello";

dom2str(p); // '

hello

'
```