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

mixpad

v0.1.1

Published

Mixpad document parser and management

Downloads

32

Readme

MixPad

MixPad is a blazingly fast, editor-grade Markdown parser built on an impossible bet: text parsing could be allocation-free.

Zero allocations during the hot path (all the arrays, objects, slicing and dicing of strings). Every Markdown parser leans into it. MixPad works against the grain.

MixPad treats HTML as native, supports all major extensions (tables, front matter, math), and delivers editor-grade precision with incremental parsing perfect for live editing and massive documents.

Annotated Markdown

MixPad's tests are written as annotated Markdown files that double as documentation and executable specs. Tests live in parse/tests/*.md and use position markers plus token lines to assert lexer behavior directly in human-readable files.

Consider that snippet from HTML entities docs:


5) On-disk encoding and generator notes
- At start the code parses a compact textual map
(one- or two-letter buckets). Parsing of the map is
a preparation for runtime matching.

## Simple examples

A simple named entity: &
1                      2
@1 InlineText
@2 EntityNamed

Markers on the text line (1 2) map to @ assertions that specify token kinds and attributes. The test runner reads these Markdown files, runs the scanner against them, and any failures are mapped back into the same format, highlighting exact positions and variations for easy debugging.

It serves both as an explainer for the tokens generated, and as an automated verification.

Debugging tip: Run individual tests during development using --test-name-pattern:

node --test --test-name-pattern="Ampersand" parse/tests/test-produce-annotated.js

See annotated markdown documentation for more details.

Architecture: Two-Phase Zero-Allocation

MixPad's architecture emerged from the zero-allocation constraint, creating six core principles:

HTML-Native Parsing

Following TypeScript's JSX contextual tokenization, HTML becomes recursive syntax rather than foreign text. While micromark delegates HTML to external parsers and markdown-it renders it as literal strings, MixPad commits to native integration that cuts impedance mismatch.

Two-Phase Processing

Complexity demanded separation:

  • Phase 1 - scan0: Provisional scanning with minimal decisions. 31-bit integers store length and basic flags. No string allocations, no semantic resolution.
  • Phase 2 - Semantic: Span-level analysis over provisional records. Delimiter pairing, text materialization, structural recognition.

Hot path complexity stays constant while semantic richness grows independently.

Speculative Parsing

Markdown ambiguities need decisions based on future context. TypeScript's lookAhead() checkpoint-rollback patterns let you backtrack through primitive parser state snapshots without allocation—state restoration uses primitive indices rather than object copying.

Growing Number Buffer

A buffer of 31-bit integers packs position, length, flags, and semantic hints—the bridge between lexical analysis and syntactic parsing. String comparisons become bitwise operations. Context queries drop from O(n) to O(1).

Performance Excellence

The absurd constraint pushes architectural innovation. Every design decision serves the zero-allocation goal:

🚀 Zero-Allocation Operation: Keep automaton state as primitives, speculate without heap allocation, use packed token flags instead of string comparisons. Parse at the speed of memory reads.

Industry-Leading Speed: Match or exceed lower-level language parsers. Benchmarking shows scaling advantages on medium documents, clear superiority on large documents.

🎯 Incremental Precision: Scanner statelessness keeps incremental capabilities while permissive recovery handles malformed input. Sub-millisecond updates to massive documents.

📐 Editor-Grade Features: Exact source positions, comprehensive error recovery, seamless HTML/Markdown unification. Built for the next generation of editing tools.

Performance comes from refusing to create problems rather than solving them efficiently.

Contributing

We welcome suggestions, bug reports, and architectural discussions. This parser represents a fundamental rethinking of Markdown parsing—your insights help push the boundaries of what's possible in text processing performance.