npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tool-markdown-html

v1.2.15

Published

A module that convert a markdown document into html code

Readme

markdown-html

这是一个可以将markdown文档转换成html代码的小模块

你可以直接将你的markdown文档,通过这个小工具转换成html,并发送给浏览器 当前版本对markdown的支持如下 | 语法演示 | 名称 | 是否支持 | |-----|-----|-----| |# |1至6级标题| √ | |+ - * |列表| √ | |`` |代码行| √ | |~~~ |代码行| × | |``` |代码块| √ | | |代码块| × | |> |区块| √ | |~~ |删除线| √ | |<u> |下划线| √ | |~ |下标| √ | |^ |上标| √ | |--- ***|分割线| √ | |![]() |图片| √ | |[]() |链接| √ | | |表格| √ | | |表格对齐方式| × | |[^1] |脚注| √ | |$...$ $$...$$ |公式| × |

安装:

npm install markdown-html --save-dev

使用:

作为普通函数调用(不接收返回值)

parse方法会将转换好的文件输出到指定目录

// main.js
const parse = require("markdown-html")

parse(__dirname + "/test.md", {
  output: "../dist/index.html",
  template: "./temp.html"
})

如果已经存在相应html模板,可以指定template选项

作为普通函数调用(接收返回值)

parse方法将返回<mdFile>类 这对将来做其他事情很有用,这将不会输出文件 比如:

const mdFile = parse(__dirname + "/test.md", {
  output: "../dist/index.html",
  template: "./temp.html",
  return: true              // 设置return
})

express.get('/', (req, res) => {
  /***something...***/
  res.send(mdFile.mdHtml)
})

@1.1.13版本更新说明

修改了多个方法之间的冲突 更改了多个方法的匹配规则 还原了部分md文档默认样式

目前存在的已知bug和未完成的功能

二级以上的列表无法解析 文本解析功能尚未完善 表格中的加粗倾斜未解析 语法高亮未实现 大纲未实现

注意,目前版本在输出目录不存在的情况下,会报错