
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
md2html-parser
Advanced tools
md2html-parser
adalah library sederhana yang berfungsi untuk mengonversi teks berformat Markdown menjadi HTML dengan mudah dan cepat.
Untuk menginstal md2html-parser
, gunakan npm:
npm i md2html-parser
Berikut adalah contoh penggunaan dasar md2html-parser
:
import mdhtml from "md2html-parser";
const html = await mdhtml({
text: "# Hello World\n\nThis is a markdown example.",
theme: "dark",
title: "This is a markdown example."
});
console.log(html);
md2html-parser
menyediakan beberapa opsi konfigurasi yang dapat digunakan untuk menyesuaikan hasil konversi:
text
: Teks berformat Markdown yang akan dikonversi.theme
: Tema untuk hasil HTML. Pilihan: "light"
, "dark"
.title
: Judul dari dokumen HTML.Berikut adalah contoh penggunaan lanjutan md2html-parser
dengan opsi konfigurasi tambahan:
import mdhtml from "md2html-parser";
const html = await mdhtml({
text: `
# Hello World
This is a markdown example with **bold text** and *italic text*.
## Table of Contents
- [Introduction](#introduction)
- [Usage](#usage)
- [Conclusion](#conclusion)
## Introduction
This is the introduction section.
## Usage
This is the usage section.
\`\`\`js
console.log("Hello, world!");
\`\`\`
## Conclusion
This is the conclusion section.
`,
theme: "light",
title: "Advanced Markdown Example"
});
console.log(html);
md2html-parser
dilisensikan di bawah MIT License.
FAQs
Convert markdown to html
We found that md2html-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.