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

wiki-plugin-file

v0.2.0

Published

View a file from a page's assets folder inline — markdown, TOML, JSON, code, images — with provenance, a drift badge, and Raw/Download/Copy.

Readme

wiki-plugin-file

Read a file from a federated wiki page's assets folder, inside the page.

Farms serve assets with whatever Content-Type their mime table guesses, so browsers download .toml, .py, .rs and even .md. This plugin fetches the bytes with fetch() (which ignores Content-Type) and renders them itself: markdown through the wiki's own markdown plugin (wikilinks resolve), TOML as one table per section, JSON pretty-printed, code with line numbers, images inline. Every text file gets Raw (opens a text/plain blob in a new tab, which every browser displays), Download, Copy and the asset URL.

Item text

FILE BUGS.toml                     a file in this page's own assets folder
FILE assets/other-slug/notes.md    a file in another folder on this site
FILE https://host/assets/x/y.md    any absolute asset URL
FOLDER [slug | https://host/assets/path]   list a folder; click a name to read it
LINES 60                           collapse threshold (default 40)
SHOW                               start expanded

An empty item lists the page's own folder.

Provenance and drift

If the folder carries a SOURCES.toml manifest (written by asset-snapshot.py), the viewer shows each file's role, source path, repo, commit and snapshot date, and hashes the fetched bytes: a green badge means the file still matches the manifest, red means it was edited in place or the manifest is stale.

Lazy loading

The client ships as two files: client/file.js (~14 KB, always loaded) and client/toml.js (~11 KB, the smol-toml parser), which the main bundle fetches from /plugins/file/toml.js the first time a .toml file is rendered as tables. SOURCES.toml provenance uses a built-in mini reader (flat tables of strings, numbers, booleans), so folder lists, badges and non-TOML files never trigger the extra request. If toml.js cannot load, the file is shown raw with a note.

Build

npm install
npm run build     # esbuild → client/file.js
npm test