1.0.3 • Published 8 months ago

html2jsonconvertor v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

HTML to JSON Converter

Description

This is a JavaScript program that converts HTML code to a JSON object.

Table of Contents

Installation

You can install this program using npm or yarn:

npm install html2jsonconvertor

or

yarn add html2jsonconvertor

Usage

To use the HTML to JSON converter, you can do the following:

const parseHTML = require("html2jsonconvertor");

const html = `
    <div style="background-color: yellow; font-size: 14px" id="first-div"> 
        Hello, friends 
        <p class="para" style="font-faimly: monospace; font-size: 11px"> Lorem ipsum dolor sit </p>
        <footer style="width: auto; height: 100px; color: blue"> <span> This is the end </span> </footer>
    </div>`;
const json = parseHTML(html);

console.log(json);

CLI & Browser Integration

  • CLI (index.js)
  • Browser (server.js)
1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago