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

inferModule-jsdoc-plugin

v1.0.5

Published

A JSdoc plugin that automates the naming of modules.

Readme

inferModule.js JSDoc Plugin

No more @module tags in your JSDoc comments. Just define module names using regular expressions in your configuration file and generate your JSDoc documentation.

Using JSDoc's -c option, pass the JSDoc confiuration file that has the inferModule.js plugin enabled. In the configuration file, using the key inferModule, specify a schema array of regexp replacement objects defining what you would like module names changed from and to (note that the regexp is a string in the JSON object, so some escaping of characters may be in order). You may optionally set file paths that the inferModule plugin should exclude by including an exclude key. The glob patterns that can be handled are described here.

Here is an example basic conf.json to enable the plugin:

{
    "plugins": ["path/to/inferModule"],
    "inferModule": {
        "exclude": [
            "lib/foo/b.js",
            "..."
        ],
        "schema": [
            { "from": "^lib\\/foo\\/(.*)\\.js$", "to": "bar/$1" },
            { "from": "...", "to": "..."}
        ]
    }
}

If no regexp is matched, then the module defaults to the file path (without the file extension). Additionally, if the file comment already has a @module tag, the module name in the tag takes precedence, even if the file is matched (the @module tag can be located anywhere in the comment). If the inferModule.schema key is missing from conf.json, the plugin does not alter JSDoc's behavior. Each file must contain a toplevel comment in the simplest form.

For example, to have JSDoc interpret lib/foo/a.js as the module baz/a as specified in the example conf.json above, use the following command from jsdoc_plugin/: ./node_modules/.bin/jsdoc lib/* -c path/to/conf.json. The generated documentation based on inferModule schema array objects is in out/.

You may have jsdoc installed differently. In that case, you will need to alter the command and paths according to your installation.

Testing

This plugin uses mocha and chai to handle testing. To run the testing suite, from inferModule-jsdoc-plugin/ run npm install, then npm test.