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

@sld0ant/pi-diff

v1.0.1

Published

High-performance diff for pi-agent with Patience algorithm and WASM acceleration

Downloads

162

Readme

@sld0ant/pi-diff

High-performance diff patch for pi-agent with Patience algorithm and WASM acceleration.

Quick Install

bunx @sld0ant/pi-diff install

Uninstall

bunx @sld0ant/pi-diff uninstall

Check Status

bunx @sld0ant/pi-diff status

Features

  • Patience algorithm for code — better structure preservation (functions, classes)
  • Myers algorithm for data — faster for JSON, YAML, Markdown
  • WASM acceleration — 5-8x faster on large files (>1000 lines)
  • 80 KB — compact universal WASM bundle

How It Works

Auto Algorithm Selection

| File Type | Algorithm | Reason | |-----------|-----------|--------| | .ts, .js, .py, .rs, .go | Patience | Preserves code structure | | .json, .yaml, .md, .txt | Myers | Faster for data | | >10000 lines | Myers | Performance |

Example Difference

Refactoring: moving a function

Myers shows:

-function hello() { ... }
+function world() { ... }

(thinks hello was replaced with world)

Patience shows:

+function world() { ... }
 
 function hello() { ... }

(understands world was added, hello stayed)

Performance

| File Size | JS (diff) | WASM (@sld0ant/pi-diff) | Speedup | |-----------|-----------|-------------------------|---------| | 1000 lines | 4ms | 2.5ms | 1.6x | | 5000 lines | 119ms | 21ms | 5.6x | | 10000 lines | 520ms | 64ms | 8.1x |

Build from Source

Prerequisites

  • Rust + cargo
  • wasm-pack (cargo install wasm-pack)
  • Bun

Build

bun install
bun run build

Local Install

bun run install-patch

After Updating pi-agent

When pi-agent is updated, the patch will be overwritten. Reinstall:

bunx @sld0ant/pi-diff install

License

MIT