parser-html

convert HTML Code to JS object

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
parser-html
001.0.64 years ago4 years agoMinified + gzip package size for parser-html in KB

Readme

parserHTML
JS library to convert HTML Code to JS Object

Installation

Installation from npm ```js npm i parser-html ``` For Browser Use ```html ```

Init Parser Object

for Node JS ```js var parserHtml = require("parser-html"); ``` for Browser ```js var parserHtml = parserHTML; ``` ```js var template = `
<div class='shadow background box20 white-color relative'>
<div class='container'>
<h1>Title of Page</h1>
</div>
</div>
`; parserHtml.parse(template, function(data) { console.log(data); // return the Tree Object }); ```