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

amish-js

v1.1.0

Published

Seamless SSR page transitions + simple DOM controllers. No build step.

Readme

amish-js

A return to a simpler time.

I visited a website the other day. The checkboxes didn't work. I opened devtools to find 14 megabytes of JavaScript responsible for rendering them. Fourteen megabytes. For checkboxes.

Checkboxes worked in 1994. They worked without JavaScript. They worked on a 28.8k modem. What happened?

We fucked up. Somewhere along the way, we convinced ourselves that complexity is progress. That you need a virtual DOM to toggle a boolean. That "developer experience" means waiting for webpack to compile.

amish-js is the mass exodus back to sanity:

<link rel="stylesheet" href="amish.css">
<script src="amish.js" defer></script>
  • View transitions between server-rendered pages — no SPA required
  • DOM controllers that attach behavior to HTML — no virtual DOM, no reactivity tax
  • ~100 lines of JS — read it, understand it, own it

Your pages already work. This just makes them smoother.

Install

Copy to your project:

npx amish-js ./public

Or use a CDN:

<link rel="stylesheet" href="https://unpkg.com/amish-js/amish.css">
<script src="https://unpkg.com/amish-js/amish.js" defer></script>

Then add the view transition meta tag:

<meta name="view-transition" content="same-origin">

View Transitions

Elements with .amish-persist-* classes stay in place across page navigations:

<header class="amish-persist-header">...</header>
<nav class="amish-persist-nav">...</nav>
<aside class="amish-persist-sidebar">...</aside>
<footer class="amish-persist-footer">...</footer>

<!-- Generic persist for any element -->
<div class="amish-persist">...</div>

Add a loading bar:

<div class="amish-loader"></div>

Controllers

Attach behavior to elements with the controller attribute:

<div controller="counter">
  <span class="count">0</span>
  <button class="inc">+</button>
  <button class="dec">-</button>
</div>

Define a controller:

class Counter {
  attach() {
    this.count = this.$('.count')
    this.inc = this.$('.inc')
    this.dec = this.$('.dec')
    this.n = 0

    this.$on(this.inc, 'click', this.increment)
    this.$on(this.dec, 'click', this.decrement)
  }

  increment() {
    this.n++
    this.count.textContent = this.n
  }

  decrement() {
    this.n--
    this.count.textContent = this.n
  }

  detach() {
    // optional cleanup
  }
}

amish.register('counter', Counter)

Controller API

  • this.element - the controller's root element
  • this.$(selector) - querySelector scoped to element
  • this.$all(selector) - querySelectorAll scoped to element
  • this.$on(el, event, handler) - addEventListener with auto-cleanup and bound this
  • attach() - called when controller is attached
  • detach() - called when controller is removed

Run Demo

npm run dev

Open http://localhost:5741/examples/

Browser Support

  • Chrome/Edge: Full support
  • Safari 17.4+: Full support
  • Firefox: View transitions behind flag, controllers work everywhere