1.0.1 • Published 8 months ago

markdown-lite-worker v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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();

1.0.1

8 months ago

1.0.0

8 months ago