html-to-json-converter-44
v1.0.2
Published
HTML To JSON Converter
Downloads
181
Readme
📍 About The Project
- This library converts HTML to JSON.
Dependencies
🚀 Getting Started
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running, follow these simple example steps.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
node
brew install nodenpm
npm install npm@latest -g
Installation locally
- Clone the repo
git clone [email protected]:umairfarooq44/html-to-json-converter.git- Install NPM packages
npm installRunning
To run the Project locally
npm run devTo run as CLI:
- Build the project.
npm run build- Run the command with path to HTML file.
node build index.html (html file path)🕹 Usage
To use it as library please run
npm install html-to-json-converter-44Then it can be used
import { htmlToJson } from 'html-to-json-converter-44';
const html = '<div>Hello World</div>';
const json = htmlToJson(html); // {tag: 'div', text: 'Hello World'}