New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

md2html-parser

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

md2html-parser

Convert markdown to html

  • 1.7.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

md2html-parser

md2html-parser adalah library sederhana yang berfungsi untuk mengonversi teks berformat Markdown menjadi HTML dengan mudah dan cepat.

Instalasi

Untuk menginstal md2html-parser, gunakan npm:

npm i md2html-parser

Penggunaan

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

Opsi Konfigurasi

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.

Contoh Penggunaan Lanjutan

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

Lisensi

md2html-parser dilisensikan di bawah MIT License.

Keywords

FAQs

Package last updated on 05 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc