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

@adamjanicki/markdown

v1.0.0

Published

A component for converting Markdown into React

Readme

@adamjanicki/markdown

A lightweight and customizable Markdown to React renderer.

Overview

This library is not a strict CommonMark implementation; it supports the majority of it with an added subset of GitHub Flavored Markdown (GFM) with some intentional omissions for security and simplicity. It's unique in its own way; it's Adamarkdown syntax. I built this for fun, so use with caution, there are likely small bugs, and slight mismatches between outputs of this and a true commonmark parser.

Installation

npm install @adamjanicki/markdown

Quick Start

import Markdown from "@adamjanicki/markdown";

function App() {
  return <Markdown>{"# Hello World\n\nThis is **bold** text."}</Markdown>;
}

Supported Features

| Feature | Syntax | | -------------------- | ---------------------------------- | | Bold | **text** or __text__ | | Italic | *text* or _text_ | | Strikethrough | ~~text~~ (GFM) | | Inline Code | `code` | | Links | [text](url) | | Images | ![alt](url) | | Headings | # through ###### | | Horizontal Rules | ---, ***, or ___ | | Code Fences | ```lang\ncode\n``` | | Blockquotes | > text | | Unordered Lists | - item | | Ordered Lists | 1. item (preserves start number) | | Tables | GFM pipe tables with alignment | | Hard Breaks | Two spaces + newline |

Unsupported Features

Notable omissions by design:

  • Raw HTML (security)
  • Reference-style links
  • Indented code blocks (use fenced ``` instead)
  • Setext headings (use # instead)
  • Task lists
  • Footnotes
  • Autolinks

Security

On the plus side, I intentionally did not support raw HTML, so you're safe from anything like that, meaning the only two XSS vulnerabilities come from URLs of image srcs and anchor href. I do not do any sanitization or filtering out of the box; you will have to implement that yourself using a custom renderer, or you can choose to drop/unwrap links.

Examples

Custom Code Block

import Markdown from "@adamjanicki/markdown";

<Markdown
  renderers={{
    pre: ({ children, lang }) => (
      <CodeBlock language={lang}>{children}</CodeBlock>
    ),
  }}
>
  {markdownWithCode}
</Markdown>;

Link Sanitization

<Markdown
  renderers={{
    a: ({ children, href }) =>
      href.startsWith("https://") ? (
        <a href={href} target="_blank" rel="noopener noreferrer">
          {children}
        </a>
      ) : (
        <span>{children}</span>
      ),
  }}
>
  {markdown}
</Markdown>

Custom Syntax Extensions

<Markdown
  inlineExtensions={[
    {
      token: "==",
      intraword: true,
      renderer: ({ children }) => <mark>{children}</mark>,
    },
    {
      token: "^^",
      intraword: true,
      renderer: ({ children }) => <sup>{children}</sup>,
    },
    {
      token: "%%",
      intraword: false,
      renderer: ({ children }) => <small>{children}</small>,
    },
  ]}
>
  {"Text with ==highlight==, ^^superscript^^, and %%small%% text"}
</Markdown>

Want to play around with the component? Head over to the Playground