Skip to content

said10/parserHTML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parserHTML

JS library to convert HTML Code to JS Object

Installation

Installation from npm

npm i parser-html

For Browser Use

<script src="js/dist/parser-html.js"></script>

Init Parser Object

for Node JS

var parserHtml = require("parser-html");

for Browser

var parserHtml = parserHTML;
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
});

About

JS library to convert HTML Code to JS Object

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published