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

markup-lang

v1.0.0

Published

A lightweight custom markup language parser — converts Markup syntax to HTML.

Readme

markup-lang

A lightweight custom markup language parser that converts Markup syntax into HTML. Not Markdown — Markup.

npm install markup-lang

Quick Start

npm / bundler

import { parse } from 'markup-lang';
import 'markup-lang/markup.css'; // optional default styles

document.getElementById('output').innerHTML = parse(`
# Hello, Markup

Use **bold**, //italic//, and ==highlight==.

[INFO] This is a callout box.
`);

CDN (no build step)

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markup-lang/markup.css">
<script src="https://cdn.jsdelivr.net/npm/markup-lang/dist/markup.umd.js"></script>

<div id="output"></div>

<script>
  document.getElementById('output').innerHTML = MarkupLang.parse(`
# Hello, Markup

Use **bold**, //italic//, and ==highlight==.
  `);
</script>

Node.js (CommonJS)

const { parse } = require('markup-lang');
const html = parse('# Hello **world**');
console.log(html);

Syntax Reference

| Syntax | Output | |---|---| | # Heading | H1 | | ## Heading | H2 | | ### Heading | H3 (uppercase label) | | **bold** | Bold | | //italic// | Italic | | ~~strike~~ | Strikethrough | | ==highlight== | Highlighted text | | `code` | Inline code | | [[Ctrl+C]] | Keyboard key | | 4 spaces + text | Code block | | > text | Blockquote | | - item | Unordered list | | 1. item | Ordered list | | [ ] item | Unchecked task | | [x] item | Checked task | | [INFO] text | Info callout | | [SUCCESS] text | Success callout | | [WARNING] text | Warning callout | | [ERROR] text | Error callout | | \| Col \| Col \| | Table (first row = header) | | ![caption](url) | Image with caption | | [text](url) | Link | | [? Titlebody?] | Collapsible section | | --- | Horizontal divider | | [^id] | Footnote reference | | [^id]: text | Footnote definition |


API

parse(raw: string): string

Parses a full Markup document and returns an HTML string.

import { parse } from 'markup-lang';

const html = parse(`
# My Document

Some **bold** text and a list:

- Item one
- Item two

[SUCCESS] All done!
`);

renderInline(text: string): string

Parses only inline Markup syntax (bold, italic, links, etc.) within a single line — useful when you want to process individual strings without block-level parsing.

import { renderInline } from 'markup-lang';

const html = renderInline('Hello **world** with a [link](https://example.com)');
// → 'Hello <span class="mu-bold">world</span> with a <a class="mu-link" href="...">link</a>'

Styling

The package ships with markup.css — a dark-mode reference stylesheet. All classes are namespaced with mu- to avoid conflicts.

Use the default styles:

import 'markup-lang/markup.css';
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markup-lang/markup.css">

Customise via CSS variables:

:root {
  --mu-accent:  #7c3aed;  /* purple instead of orange */
  --mu-bg:      #ffffff;
  --mu-ink:     #111111;
  --mu-muted:   #444444;
}

Or write your own styles targeting the mu-* class names.


Output Classes Reference

| Class | Element | |---|---| | .mu-h1 .mu-h2 .mu-h3 | Headings | | .mu-bold .mu-italic .mu-strike | Inline formatting | | .mu-highlight | Highlighted text | | .mu-code | Inline code | | .mu-codeblock | Code block | | .mu-kbd | Keyboard key | | .mu-link | Hyperlink | | .mu-sup | Footnote reference | | .mu-quote | Blockquote | | .mu-hr | Horizontal rule | | .mu-li | Unordered list item | | .mu-oli | Ordered list item | | .mu-check | Task list item | | .mu-callout.info/success/warning/error | Callout boxes | | .mu-table | Table | | .mu-img-wrap .mu-img .mu-img-caption | Image | | .mu-details .mu-summary .mu-details-body | Collapsible | | .mu-footnotes .mu-fn-entry | Footnote section |


License

MIT