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

isum

v1.1.0

Published

isomorphic uhtml

Readme

isum

isomorphic µhtml

Tiny wrapper that imports uhtml in the browser and uhtml/ssr in Node.js/Bun for quick & easy client and server-side rendering (SSR/SSG). With a few extra niceties.

All credits to Andrea Giammarchi for creating this mighty lib.

Example project using isum: ANSI.tools

The Main Idea™

  • Plain and web standards-based JS library, i.e. not a (meta) framework
  • Use render and html to render template literals
  • Use fine-grained reactivity with isum/reactive and @preact/signals-core

Use the provided document of isum and Vite (or something else that builds/bundles) and get SSG for free.

App

This runs in both browsers and runtimes like Node.js:

import { document, html, render } from 'isum';

export class App {
  constructor() {
    this.render();
  }

  handleClick(event) {
    console.log(event);
  }

  render() {
    const view = html`<button @click=${this.handleClick}>Hello!</button>`;

    render(document.getElementById('app'), view);
  }
}

Please refer to the µhtml docs for details.

Reactivity with Signals

Introduced in v1.1.0

Import the same from isum/reactive and get @preact/signals-core's fine-grained reactivity for free:

import { document, reactive } from 'isum/preactive';

const count = signal(0);

export function renderApp() {
  const render = reactive(effect); // must not call at root module level

  render(
    document.body,
    () =>
      // second argument must be a function
      html`<button onclick=${() => count.value++}>
        Clicks: ${count.value}
      </button>`
  );
}

This will render the initial values during SSG.

Please refer to the the µhtml docs for details.

Client-side

Bootstrap in index.js:

import { App } from './app.ts';

new App();

Browser

Initial template/container index.html:

<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <main id="app"></main>
    <script type="module" src="index.js"></script>
  </body>
</html>

SSG

Read template, render application, write result:

import { readFileSync, writeFileSync } from 'node:fs';
import initSSR from 'isum'; // must import same as in rest of app (e.g. 'isum/preactive')
import { renderApp } from './app.js';

const pages = {
  'index.html': () => renderApp()
};

for (const [filePath, render] of Object.entries(pages)) {
  const template = readFileSync(filePath, 'utf-8');
  const { document } = init(template);
  render();
  writeFileSync(filePath, document.toString());
}

This renders the <button> inside <main>.

This should scale well due to ESM live bindings. Here's an example build script.

Look ma, no bundler!

Run the app in the browser without a build step:

<!doctype html>
<html>
  <head>
    <link rel="stylesheet" href="styles.css" />
    <script type="importmap">
      {
        "imports": {
          "isum": "https://unpkg.com/[email protected]/browser.js",
          "udomdiff": "https://unpkg.com/[email protected]/min.js",
          "uhtml": "https://unpkg.com/[email protected]/keyed.js"
        }
      }
    </script>
  </head>
  <body>
    <main id="app"></main>
    <script type="module" src="index.js"></script>
  </body>
</html>

CSS imports?

Ignore any CSS imports in JS modules:

node --import isum/no-css build.js

Useful when using e.g. Vite. isum pairs great with Vite.