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

md2dom

v25.8.11

Published

Mardown to DOM

Readme

logo

A ~100LoC safe Beyond Markdown to NodeList parser.

Usage

import md2dom from "./md2dom.js";

const Md = new md2dom()
myDiv.replaceChildren(...Md.parse("Hi *me* !"));

Limitation

This parser favor simplicity and safety over backward compatibility.

  • all HTML tags (<script>, <!-- ...) are rendered as plain text.
  • blockquote use the same block syntax (>>> and <<<) as block of code

Demo

See: live rendering

Inline elements

| render | Markdown | | ------ | ---- | | strong word | *strong word* | | strong word | _strong word_ | | emphasis word | **emphasis word** | | emphasis word | __emphasis word__ | | ~~strike word~~ | ~~strike word~~ | | :+1: | :+1: | | inline code | `inline code` | | ftp://[email protected]/z | <ftp://[email protected]/z> | | [email protected] | <[email protected]> | | my link | [my link](url) | | logo | ![logo](logo.svg) | | linked logo | [![linked logo](logo.svg)](url) |

CommonMark syntax are also supported for when precise formating (middle of a word) is needed

| render | CommonMark | | ------ | ---- | | st{ron}g | st{_ron_}g | | em{pha}sis | em{*pha*}sis | | high{=li=}ght | high{=li=}ght | | de{-le-}tion | de{-le-}tion | | in{+ser+}tion | in{+ser+}tion | | st{~ri~}ke | st{~ri~}ke | | ~sub~ | ~sub~ | | ^sup^ | ^sup^ |

Block elements

Code

To format code into its own distinct block, use at least three ``` syntax.

```prng.c
int getRandomNumber() {
  return 4; // chosen by fair dice roll
}
```

Quote

blockquote starts with > and can span on multiple lines

another distinct blockquote

Table

Same as markdown, but with stricter syntax: all rows must start and end with a |.

|A 1 cell table|

If a separator/align line is found, all it preceding lines become th

|Default Header | Left Header | Center Header | Right Header | |------- | :---- | :------: | -----: | |Default | Left | Center | Right |

List

  • first list item

  • same list item

  • new list because of new paragraph

  • new list because of type changes
  • new list because of type changes again
  1. numerated list starting at 5
  2. next entry is simply incremented
  • unnumbered nesting example
    • two space is 1 indent
      • even deeper
      • continued
    • back to level 2
  • the end
  1. number nesting
    1. dive two level directly
    2. dive two level directly
    3. we need to go deeper
    4. we need to go deeper
    5. we need to go deeper
    6. dive two level directly
  2. back to skiped level 2
  3. back to level 1