html-to-object
A lightweight HTML parser for JavaScript that converts your native HTML code into an Array of JavaScript Objects.
Install
$ npm install --save html-to-object
Usage
const h2o = ; const results = ;
Options
build (default: false)
Returns the parsed elements as prebuilt DOM nodes to easily append them to the page.
const fs = ;const h2o = ; const results = ;
targetIsFile (default: true)
In case of preloaded .html file content.
const fs = ;const h2o = ; const html = fs;const results = ;
attributesAsObject (default: false)
Will define the attributes property of each element as an Object instead of an Array.
const h2o = ; const results = ;