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

plugger

v0.0.2

Published

A generic plugin management system for Node.js

Readme

Plugger

Status: Soft custard - the basics are worked out but not everything is working, things will probably change.

Because writing a modular plugin system sucks.

Let's face it, you want to write some sooper cool uber application that allows your users to register modules, plugins, whatever... At first, this seems like a really simple thing to do, so you try one of the obvious:

* Read in a list of modules from a config file and load them, easy, simple, fast
* Read a directory containing a listing of all of the plugins and load them

This works for a while, but then "Plugin A" requires that "Plugin B" be loaded first. Problem is, the user didn't install "Plugin B", or they installed it but as a NPM module. If your using a configuration array this isn't too bad, just move things around. If your using the load from folders, then suggest that your users use some archaic naming convention.

This works again for a while, but again your users do something they shouldn't. Say load two different conflicting libraries that do user validation. Now, everything breaks yet again. Sure, you could just tell everyone to name their modules something like "Security" but no one really likes naming conventions.

Plugger aims to alleviate all of these headaches by introducing a common and simple plugin loading system that supports loading of plugins from a folder, from a configuration array, and takes care of conflicting libraries based on priority, roles and/or names.

The Plugin

Plugin: {
  version: '0.0.0', // Semver, required
  priority: -1, // An optional priority
  requires: [ // Optional list of requirements to meet
    'someOtherModule', // Require by name
    'anotherModule@version', // Require by name and version
    {type: 'storage'}, // Require by type
    {role: "storage engine'} // Require by role
  ],
  type: 'security', // Optional type
  role: 'authentication', // Optional role
  unique: { // Optionally make it unique
    type: true, // by type
    role: true // and/or by role
  },
  description: 'Optional description of the plugin',
  plugin: Object||Array||function(){
    // Whatever you want or need
  }
}

NOTE: Types and Roles are not implemented yet. May have to move to a fetch then load scenario to allow for these.

What Plugger is NOT

Plugger will not actually do anything with the plugins it loads for you. It will simply load them and make them available for you to then utilize. You will still need to walk the plugins and tie them back to your application. See the examples for more information.

Plugger also will not stop your application from loading when it finds an error. It simply marks the plugin as in error, attaches the errors to the plugin details, and moves on. The errors are also returned in the loaded callback.

Options

Defaults: {
  path: 'plugins',
  defaultPriority: 0
};

What's done

Currently Plugger can load plugins from an array or a directory and will load in any required plugins as well.

How it works

API

load(callback)

callback(errors, packages)

load(library, callback)

callback(errors, packages)

load([library, library, ...] callback)

callback(errors, packages)

safe(library, callback)

callback(errors, isSafe)

prepare(callback)

callback(errors, packages)

Example

var Plugger = require('plugger').Plugger;

var plugger = new Plugger({
  path: path.resolve('./', 'plugins')
});

plugger.load(function(errs, plugins){
  if(errs && !plugins){
    console.log(errs);
    process.exit(1);
  }
  console.log('Loaded plugins:');
  plugins.forEach(function(plugin){
    console.log(plugin);
  });
  console.log('All plugins are ready for you to do something with');
});