Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuri2peter/npm-markdown-parser
@yuri2/markdown-parser 是一个将markdown文本转换为带样式的html的方法库。支持服务端和客户端。
https://github.com/yuri2peter/npm-markdown-parser
Last synced: about 2 months ago
JSON representation
@yuri2/markdown-parser 是一个将markdown文本转换为带样式的html的方法库。支持服务端和客户端。
- Host: GitHub
- URL: https://github.com/yuri2peter/npm-markdown-parser
- Owner: yuri2peter
- License: mit
- Created: 2022-10-19T03:15:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-19T03:54:20.000Z (about 2 years ago)
- Last Synced: 2024-10-13T14:16:55.987Z (3 months ago)
- Language: TypeScript
- Size: 460 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @yuri2/markdown-parser
[Github](https://github.com/yuri2peter/npm-markdown-parser)
@yuri2/markdown-parser 是一个将 markdown 文本转换为带样式的 html 的方法库。支持服务端和客户端。## 安装
`npm i @yuri2/markdown-parser`
## 使用
```ts
import { markdownToHtml } from "../src/index";const text = `
# Hello WorldI am a list:
- Item1
- Item2
- Item3`;
async function main() {
const results = await markdownToHtml(text);
console.log(results);
}main();
```