markdown-lite-worker

1.0.1 • Public • Published

My HTML to JSON Package

markdown-lite-worker is a simple npm package that fetches an HTML page from a given URL, cleans unwanted tags and inline styles, converts the HTML to Markdown, and extracts basic metadata (title, language, source URL, status code).

Installation

You can install this package via npm:

npm install markdown-lite-worker

Example

import { fetchHtmlToJson } from "markdown-lite-worker";

async function fetchData() { const url = "https://example.com"; const result = await fetchHtmlToJson(url);

if (result.success) { console.log("Markdown:", result.data.markdown); console.log("Metadata:", result.data.metadata); } else { console.error("Failed to fetch data:", result.error); } }

fetchData();

Package Sidebar

Install

npm i markdown-lite-worker

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

3.36 kB

Total Files

4

Last publish

Collaborators

  • manimohanr