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

md-reverse

v1.0.0

Published

written by JavaScript. Convert HTML to Markdown.

Readme

mdReserve

将HTML文本转换为Markdown格式文本。由JavaScript编写

Demo

安装

npm:

npm install md-reserve

script引入:

<script src="../dist/md-reverse.browser.js" type="application/javascript"></script>

前往Github下载

用法

ES6 Modules
import {MdReverse, TablePlugin, StrikethroughPlugin} from "md-reverse";

const mdReserve = new MdReverse();
mdReserve.toMarkdown(`<h1>Hello World!</h1>`);

// 使用插件扩展Table, Strikethrough语法
mdReserve.use(TablePlugin);
mdReserve.use(StrikethroughPlugin);
mdReserve.toMarkdown(`<h1><delHello World!</del></h1>`);
原生js
const mdReserve = new MdReverse();
mdReserve.toMarkdown(`<h1>Hello World!</h1>`);

// 使用插件扩展Table, Strikethrough语法
mdReserve.use(MdReverse.plugin['table']);
mdReserve.use(MdReverse.plugin['strikethrough']);
mdReserve.toMarkdown(`<h1><delHello World!</del></h1>`);

支持语法

  1. Markdown基本语法
  2. Table语法
  3. strikethrough语法

提示

  • 因为各个网站的网页结构千奇百怪,做不到匹配所有网站,建议转换的HTML文本本身就是由Markdown编写的或符合Markdown规范。 在转换非Markdown规范的HTML文本可能准确性会大大下降。
  • 目前仅能支持Markdown的基本语法扩展语法部分会在之后陆续完成。
  • 为了提高转换的准确性,对于无法识别的HTML标签,md-reserve会将其删除。这个问题在扩展语法部分完成后会尝试解决。