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

fastrender

v0.4.14

Published

Real-time Markdown and LaTeX rendering library using WebAssembly

Readme

fastrender

Real-time Markdown and LaTeX rendering library using WebAssembly.

Features

  • Fast Markdown rendering using WebAssembly
  • LaTeX support via KaTeX
  • Mixed content support (Markdown with inline and display LaTeX)
  • Caching for improved performance
  • TypeScript support

Installation

npm install fastrender
# or
yarn add fastrender
# or
bun add fastrender

Usage

import fastrender from 'fastrender';

// Create an instance
const fastrender = new fastrender({
  debug: false,
  katexOptions: {
    throwOnError: false
  }
});

// Render Markdown
const markdown = await fastrender.renderMarkdown(`
# Hello World
This is **bold** text.
`);

// Render LaTeX
const latex = fastrender.renderLatex('\\frac{1}{2}');

// Render mixed content
const mixed = await fastrender.renderMixed(`
# Math Example
Here's an inline equation: $E = mc^2$

And a display equation:
$$
\\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}
$$
`);

API

new fastrender(options?)

Creates a new fastrender instance.

Options:

  • debug?: boolean - Enable debug mode
  • katexOptions?: KatexOptions - KaTeX rendering options

renderMarkdown(content: string): Promise<string>

Renders Markdown content to HTML.

renderLatex(content: string, displayMode?: boolean): string

Renders LaTeX content to HTML.

renderMixed(content: string): Promise<string>

Renders mixed Markdown and LaTeX content to HTML.

clearCache(): void

Clears the internal render cache.

Examples

Pure Markdown

const markdown = await fastrender.renderMarkdown(`
# Hello World
This is a **bold** statement.
`);

Pure LaTeX

const latex = fastrender.renderLatex('\\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}', true);

Mixed Content

const mixed = await fastrender.renderMixed(`
# Math and Text Combined

Here's the quadratic formula: $ax^2 + bx + c = 0$

The solution is:

$$x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$$

And here's Einstein's famous equation: $E = mc^2$
`);

Development

# Install dependencies
bun install

# Run development server
bun run dev

# Run tests
bun run test

# Run benchmarks
bun run benchmark

License

MIT