npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details


  • User packages



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.


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 🙏

© 2022 – Pkg Stats / Ryan Hefner




HTML UI bootstrap and automation using CSS directives





Build Status NPM version Code Climate

What is it?

TL;DR: An HTML decorator library.

Want to use JavaScript without writing it? Want your team to be able to use your BackboneJS or JavaScript components without manually initializing them? Well you and your team should use Dorsal!

Dorsal swims around your DOM in search of HTML that's hungry for delicious, delicious JavaScript. Dorsal scoops up those DOM elements and wires them up just by applying one class to your HTML. We were inspired by the directives system in Angular and wanted to bring something similar to our frontend stack here at Eventbrite.

Dorsal is platform agnostic, has no dependencies, and has been tested to work with IE8+, Firefox, Safari, and Chrome.


Dorsal is compatible with AMD, CommonJS, and namespaces.

  • CommonJS/Node: require('dorsal')
  • AMD: require('node_modules/dorsal/dist/dorsal')
  • Namespaces: window.Dorsal after adding src/dorsal.js as a script

Installation is easiest using npm: npm install dorsal --save


Register a plugin

The following is an example of a plugin and its usage. We define a Dorsal plugin named hello-world. Once wire is called Dorsal will query for .js-d-hello-world in the DOM and all occurances will be initialized.

<div class='js-d-hello-world'></div>

    Dorsal.registerPlugin('hello-world', {
        create: function(options) {
            console.log(this === options.el); // true
            options.el.innerHTML = 'Hello World';
            return options.el;
        destory: function(options) {
            options.instance.innerHTML = '';



You don't need to wire your whole page. Dorsal.wire() accepts an element as an optional argument. If no element is provided it will use document as the parent and find all occurances within it.

<div class='js-d-other-plugin'></div>

<div class='some-arbitrary-parent-selector'>
    <div class='js-d-hello-world'></div>
    <div class='js-d-hello-world'></div>
    <div class='js-d-hello-world'></div>

    // if using jquery


Sometimes you'll want to rewire something if it changes dynamically and your plugin can't account for that. In that case, you should use rewire.

<div class='js-lorem-1 js-d-lorem' data-xd-wired="lorem">Lorem yay</div>

<div class='js-lorem-2 js-d-lorem' data-xd-wired="lorem">Lorem yay</div>

    // disable the first lorem
    Dorsal.unwire($('.js-lorem-1').get(0), 'lorem');

    // change the type of the second lorem to bacon
    $('.js-lorem-2').data('d-type', 'bacon');
    // replaces lorem ipsum with bacon ipsum
    Dorsal.rewire($('.js-lorem-2').get(0), 'lorem');

Deferred Promises

Dorsal plugins run asynchronously, preventing too much blocking on the page. To more easily determine when it completes, Dorsal returns a jQuery compatible deferred promise from the Dorsal.wire() and Dorsal.rewire() functions. Every plugin that runs will trigger a progress notification, providing the plugin's return value to all registered progress handlers. The promise will resolve once all plugins have been processed, triggering the done handlers.

        .progress(function(pluginName, pluginResponse, dorsal) {
            alert('Plugin "' + pluginName + '" completed!');
        .done(function(dorsal) {
            alert('Dorsal completed!');

Arguments and Data Attributes

Sometimes you will want to pass options to your selectors. In such cases you can use data attributes.

    data-d-prefix='Ohhhh, '

    Dorsal.registerPlugin('hello-world', {
        create: function(options) {
            console.log(; // bacon

            var helloMap = [
                    bacon: 'Bacon world',
                    default: 'Hello world'
                variant = options.nonStandardHelloVariant || 'default',
                prefix = || '';

            options.el.innerHTML = prefix + helloMap[variant];
            return el;
        destroy: function(options) {
            options.instance.innerHTML = '';



See it in action by opening examples/lorem.html. This use case automatically inserts Lorem ipsum wherever a .js-d-lorem class is used.


Copyright 2014 Eventbrite

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.