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

@pic0/spaish

v2.1.0

Published

SPAish - progressive enhancer for your MPA, make it feel SPAish

Downloads

5

Readme

SPAish

SPAish - progressive enhancer for your MPA, make it feel SPAish.

Minified bundle size really open source License npm version

SPAish makes Multi-Page Applications (MPAs) feel a bit more like Single-Page Applications (SPAs) — without changing your architecture.

It's a small, framework-agnostic JavaScript library that allows you to:

  • Restore scroll positions across navigations
  • Reopen <details> elements after reload
  • Toggle and restore color schemes
  • Add anchors to headings
  • Store all state in sessionStorage
  • It adds no dependencies, weighs ~2KB minified

Use it with a <script> tag and enhance your site with just a few lines.

💡 Why?

MPAs often lose state (scroll, UI toggles, etc.) between page loads. SPAs often come with huge frameworks and complexity, size and speed overhead without much gain.
SPAish helps you preserve these micro-interactions without rewriting your site. See how kokoanalytics uses exactly this same approach.

🚀 Getting Started

Include via a script tag at the end of your page, or at least after the DOM nodes referred to have been rendered.

<script src="https://cdn.jsdelivr.net/npm/@pic0/[email protected]/_dist/spaish.min.js"></script>
<script>
  // Restore scroll position of the page, useful e.g. when filtering/sorting data, big forms, comments, threads, ...
  spaish.scroll.restore();
  
  // Reopen the <details> on page changes or when coming back to the page.
  spaish.details.reopen();
  
  // Restore the color scheme, e.g. light or dark mode.
  spaish.colorScheme.restoreLast();
  
  // Add anchors to headings, so you can link to them.
  spaish.section.addAnchors();
</script>

<p>Toggle the color scheme.</p>
<button onclick="spaish.colorScheme.toggle();">Toggle Color Scheme</button>