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

i-runner

v0.2.0

Published

A self-destructing custom element for one-off DOM actions

Downloads

6

Readme

i-runner

A tiny self-destructing custom element for one-off DOM actions (focus, reset and more).

Installation

npm install i-runner

Then in your code:

import "i-runner";

Usage

Simply drop the <i-run> tag in your HTML:

<!-- Focus an input with id="email" -->
<i-run action="focus" target="email"></i-run>

<!-- Reset all forms with class="signup" -->
<i-run action="reset" targets="signup"></i-run>

Attributes

  • action (string, required). One of the below listed actions.
  • target (string, optional). An element ID to select via #id.
  • targets (string, optional). A class name to select via .className.

Actions

i-runner includes a few first-party actions.

  • focus; set focus to an input field;
  • reset; reset a form;
  • addClass; add one or many CSS classes to a field;
  • setAttribute; add an attribute.

Extensibility

You can register your own actions at runtime by tapping into the exported ACTION_HANDLERS map. Every action handler follows the signature:

(elements: HTMLElement[], options: { [attrName: string]: string }) ⇒ void
  1. Import the registry (ESM) or access it from the global UMD object:
import { ACTION_HANDLERS } from "i-runner";
  1. Define your custom fadeOut handler:
function fadeOutAction(elements, options) {
  const duration = Number(options["data-duration"] || 300);
  const easing = options["data-easing"] || "linear";

  elements.forEach((element) => {
    element.style.transition = `opacity ${duration}ms ${easing}`;
    element.style.opacity = "0";

    setTimeout(() => {
      // Remove the element after the fade completes
      element.remove();
    }, duration);
  });
}
  1. Register it under a new name:
ACTION_HANDLERS.fadeOut = fadeOutAction;
  1. Use it in your HTML:
<!-- fade out and remove .alert over 500ms with ease-out -->
<i-run
  action="fadeOut"
  targets="alert"
  data-duration="500"
  data-easing="ease-out">
</i-run>

Development

# Install dev dependencies
npm install

# Build bundles (ESM + UMD)
npm run build

# Preview with a local server
npm dev

# Run basic test
npm test

Release

Because I always forget how to do this and don't feel like pulling a third-party dependency for releasing.

npm version patch # or minor, or major
npm publish
git push
git push --tags