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

@unveil/compactor

v1.0.0

Published

Convert GitHub events into a compact strings optimized for LLM efficiency

Readme

compactor

Convert GitHub events into a compact strings optimized for LLM efficiency

Install

npm install @unveil/compactor

Usage

import { compactor } from "@unveil/compactor";

const user = {}; // <-- `https://api.github.com/users/${username}`
const events = []; // <-- `https://api.github.com/users/${username}/events?per_page=100`

const jsonData = JSON.stringify({ events, user }, null, 2);

compactor(jsonData);

Example

This is an example of 2000 lines of JSON that needs to be analyzed by the LLM.

Costs more of less 12267 tokens.

{
  "user": {
    "login": "joannwalsh",
    "created_at": "2023-03-09T17:44:40Z",
    "public_repos": 134
  },
  "events": [
    {
      "type": "PullRequestEvent",
      "created_at": "2026-03-18T19:18:17Z",
      "repo": {
        "name": "repo-1"
      },
      "payload": {
        "action": "merged"
      }
    },
    {
      "type": "DeleteEvent",
      "created_at": "2026-03-16T18:24:34Z",
      "repo": {
        "name": "repo-2"
      },
      "payload": {
        "ref_type": "branch"
      }
    },
    ...(1000+ more lines of JSON)
}

This is that same 2000 lines of JSON compressed in a format that LLM will still understand.

Costs more of less 425 tokens.

u:joannwalsh|j:2023-03-09|r:134
ev:
PR>repo-1@0318
D>repo-2@0316x2,repo-5@0315
DISC>repo-3@0310x3+0309,repo-1@0313x7
PUSH>repo-4@0315,repo-29@0313x2,repo-31@0313x3,repo-34@0313x2,repo-39@0313x5,repo-36@0313,repo-2@0313
IC>repo-6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27@0314|repo-32@0313x30,repo-1@0313x2
PRO>repo-28@0313x6,repo-32@0313x11,repo-33@0313x3,repo-35@0313x3,repo-37@0313x2,repo-30@0313x2,repo-1@0313x3
PRC>repo-33@0313x2,repo-35@0313,repo-32@0313x9
IO>repo-32@0313x15,repo-1@0313x7
IEC>repo-32@0313x11,repo-1@0313
F>repo-37,33,30,28,35,32@0313
PRV>repo-30@0313x2
B>repo-29@0313x4,repo-2@0313x2,repo-31@0313x9,repo-34@0313x3,repo-36@0313x3,repo-39@0313,repo-40@0313x3

Issues and features requests

Please drop an issue, if you find something that doesn't work, or have an idea for something that works better.