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

allmark

v1.0.23

Published

A full-featured Markdown parser for web, desktop and mobile

Readme

Allmark for the Web

A full-featured Markdown parser for the web.

Features

  • CommonMark support: Almost full compliance with the CommonMark spec
  • GFM extensions: Tables, task lists, strikethrough, autolinks, footnotes, alerts
  • Extended ruleset: Additional markdown features (comments, insertions, deletions, etc)
  • CLI tool: Convert markdown files from the command line
  • Multiple output formats: HTML or console rendering

Installation

pnpm add allmark

Usage

API

The simple approach:

import { consoleRenderers, core, extended, gfm, htmlRenderers, transform } from "allmark";

const markdown = "# Hello, world!";
const html = transform(markdown, gfm, htmlRenderers);

For more control:

import { consoleRenderers, core, extended, gfm, htmlRenderers, parse, render } from "allmark";

const markdown = "# Hello, world!";
const document = parse(markdown, gfm);
const html = render(document, htmlRenderers);

Sanitization

Raw HTML in Markdown is passed through to the output by default. Use sanitize to make untrusted HTML safer before displaying it. The default configuration follows GitHub's sanitizer:

import { gfm, htmlRenderers, parse, render, sanitize } from "allmark";

const markdown = 'Hello <script>alert(1)</script><img src=x onerror="alert(1)">';
const html = sanitize(render(parse(markdown, gfm), htmlRenderers));
// => "<p>Hello <img src="x"></p>\n"

The sanitizer parses the HTML into a tree, filters it against an allowlist, and re-serializes it, so the output is always well-formed regardless of the input. Disallowed tags are unwrapped (their children are kept); tags in removeElements (script, style, iframe, etc.) are removed together with their content. Event handler attributes are always dropped, javascript: and other unsafe URL schemes are removed, and id/name attributes are prefixed with user-content- to prevent DOM clobbering (adjust styles to use the prefix, or remove prefixes in an onload script).

| Option | Default | Description | | ---------------------- | ------------------ | ---------------------------------------------------------------------- | | elements | GitHub's allowlist | Tags to keep; other tags are unwrapped, keeping their children | | removeElements | script-style tags | Tags removed together with their children | | attributes | GitHub's allowlist | Per-tag attribute rules keyed by tag; use "*" for all tags. An entry is an attribute name, [name, regex] to validate the value, or [name, protocols] to restrict URL schemes | | allowComments | false | Keep HTML comments | | allowDataAttributes | true | Keep data-* attributes | | clobberPrefix | "user-content-" | Prefix for id/name values; set to "" to disable |

CLI

# Install globally
pnpm add -g allmark

# Convert markdown to HTML
allmark input.md

# With options
allmark input.md -o output.html -r gfm -f html

CLI options:

  • -o, --output: Output file path (defaults to stdout)
  • -r, --ruleset: Ruleset to use (core, gfm, extended; default: extended)
  • -f, --format: Output format (html, console; default: html)
  • -s, --sanitize: Sanitize the HTML output (implies html format)
  • -h, --help: Show help message

Rulesets

| Ruleset | Description | | ---------- | ------------------------------------- | | core | CommonMark spec only | | gfm | CommonMark + GitHub Flavored Markdown | | extended | GFM + additional features |

Development

pnpm check        # TypeScript type checking + linting
pnpm build        # Type check + bundle
pnpm test         # Run tests (watch mode)
pnpm format       # Format with Prettier