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

doxxy

v0.4.0

Published

DOM event proxy

Readme

Doxxy

DOM Event Proxy - channel all bubbling events via a proxy listener to controller methods.

Doxxy is a minimalistic, dependency-free tool that allows the markup to change without the event listeners being bound to either the markup or the global context.

This allows more flexibility between user-actions and page rerenders/reflows regardless whether the markup is rendered on the server or the client side.

Consider this basic example:

<!-- html - View -->
<button onclick="onclick">Click me!</button>
//js - Controller
function onclick() {
    alert('Hello world!')
}

In this case the onclick handler is created on and referenced from the global context (Window), polluting the global namespace.

With Doxxy, the event listeners are soft-referenced and live in their scope of declaration.

Adding listeners with Doxxy:

<button data-event:click="click">Click me!</button>

Script

dx.action('click', e => alert('Hello world!'));

This way multiple UI control elements can be channelled through the same event listener.

Doxxy does not conflict with existing frameworks as it is using data-event:[type] attribute and does not rely on other dependencies or frameworks.

Current development target: latest browsers

Usage

Setup

import doxxy from 'doxxy';

// initialise a Doxxy on a Node
const dx = doxxy();

Configuration

By default doxxy automatically subscribes the proxy listener to all events that bubble up to the `document`` Node.

You can subscribe to a custom Node with custom events

const node = document.createElement('video'); // optional
const events = [ 'canplay', 'timeupdate', 'ended' ]; // optional
const vx = doxxy({ node, events });

Adding user actions

User actions can be either functions or objects grouping together user actions within the same topic

User action as a function:

dx.action('hello', e => alert("Hello World!"));

User actions as an object:

const start = (e) => e.dataTransfer.setData('text/plain', 'hakuna matata');
dx.action('drag', { start });

Proxy/route events to user actions

Event declaration in the markup's data attribute.

Concept: Event (such as click) >> User Action (any predefined user action)

Example

<button data-event:click="hello">Hello World!</button>

Or

<div data-event:dragstart="drag.start" draggable="true"></div>

Adding parameters to user actions

In the attribute value: [action]:[param]

<li data-event:click="showItem:0"></li>

Or use doxxy attribute generator

const attr = dx.attribute('click', 'showItem', 0);
const html = `<li ${attr}></li>`;

Unbinding Doxxy

dx.unbind();