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

markdown_yo

v0.0.4

Published

A high-performance Markdown-to-HTML converter compiled to WebAssembly

Readme

markdown_yo — WebAssembly API

A high-performance Markdown-to-HTML converter compiled to WebAssembly.

Installation

npm install markdown_yo

Quick Start

import { createRenderer } from "markdown_yo";

const md = await createRenderer();
const html = md.render("# Hello\n\n**World**");
console.log(html);
// <h1>Hello</h1>
// <p><strong>World</strong></p>

API

createRenderer(wasmOptions?): Promise<MarkdownRenderer>

Creates a new renderer instance by loading the WebAssembly module. Call this once and reuse the returned renderer for all conversions.

Parameters:

| Name | Type | Description | |------|------|-------------| | wasmOptions | WasmOptions | Optional. Configuration for the Emscripten module loader. |

WasmOptions:

| Property | Type | Description | |----------|------|-------------| | locateFile | (path: string, prefix: string) => string | Custom resolver for the .wasm file location |

Returns: Promise<MarkdownRenderer>


MarkdownRenderer.render(markdown, options?): string

Render a Markdown string to HTML.

Parameters:

| Name | Type | Description | |------|------|-------------| | markdown | string | The Markdown source text | | options | RenderOptions | Optional. Rendering options |

RenderOptions:

| Option | Type | Default | Description | |--------|------|---------|-------------| | commonmark | boolean | false | Use CommonMark-compliant parsing | | html | boolean | false | Allow raw HTML tags in output | | typographer | boolean | false | Enable typographic replacements ("", --, etc.) | | subscript | boolean | false | Enable ~subscript~ syntax → <sub> | | superscript | boolean | false | Enable ^superscript^ syntax → <sup> | | mark | boolean | false | Enable ==highlight== syntax → <mark> | | math | boolean | false | Enable $inline$ and $$block$$ math syntax | | fullFeatures | boolean | false | Enable all optional features at once |

Returns: string — the rendered HTML


MarkdownRenderer.destroy(): void

Release WASM module resources. The renderer should not be used after calling this.

Examples

Node.js

const { createRenderer } = require("markdown_yo");

async function main() {
  const md = await createRenderer();

  // Basic rendering
  console.log(md.render("# Title\n\nA paragraph with **bold** text."));

  // With CommonMark mode
  console.log(md.render(source, { commonmark: true }));

  // Allow HTML passthrough
  console.log(md.render("<div>raw html</div>", { html: true }));

  md.destroy();
}

main();

Browser (bundler)

import { createRenderer } from "markdown_yo";

const md = await createRenderer();
document.getElementById("preview").innerHTML = md.render(markdownSource);

Browser (script tag)

<script src="https://unpkg.com/markdown_yo/markdown_yo_wasm_api.js"></script>
<script src="https://unpkg.com/markdown_yo/index.js"></script>
<script>
  markdownYo.createRenderer().then((md) => {
    const html = md.render("# Hello from **markdown_yo**!");
    document.body.innerHTML = html;
  });
</script>

Custom WASM file location

If you host the .wasm file separately (e.g., on a CDN), use locateFile:

const md = await createRenderer({
  locateFile: (path) => `https://cdn.example.com/wasm/${path}`,
});

TypeScript

import { createRenderer, type RenderOptions } from "markdown_yo";

const md = await createRenderer();

const opts: RenderOptions = { commonmark: true, html: true };
const html: string = md.render("# Hello", opts);

Supported Markdown Features

  • CommonMark — 815/826 spec tests pass (98.7%)
  • GFM Tables — pipe tables with alignment
  • Strikethrough~~text~~
  • Fenced code blocks — with language info strings
  • HTML passthrough — when html: true is set
  • Typographic replacements — when typographer: true is set
  • Subscript~text~<sub>text</sub> (when subscript: true)
  • Superscript^text^<sup>text</sup> (when superscript: true)
  • Mark/Highlight==text==<mark>text</mark> (when mark: true)
  • Math$inline$ and $$block$$ math (when math: true)

Live Demo

Try it in the browser: https://shd101wyy.github.io/markdown_yo/

Building from Source

Requires the Yo compiler and Emscripten.

# Install Yo compiler
npm install -g @shd101wyy/yo

# Build the WASM API target
yo build wasm_api

# Output files:
#   yo-out/wasm32-emscripten/bin/markdown_yo_wasm_api.js
#   yo-out/wasm32-emscripten/bin/markdown_yo_wasm_api.wasm