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 🙏

© 2025 – Pkg Stats / Ryan Hefner

interdependent

v0.2.0

Published

Tool to describe a projects modules interdependency

Readme

Interdependent

Interdependent is a command line tool for scanning a Node.js project and produce a count of how many internal dependencies each module in the project has.

Why Internal Dependencies?

Its good to check how many things your project depends on externally; that is how many third party packages does your project depend on and in turn how many packages do they depend on and so forth; however, what about how many of your own modules internal to your project does each of your modules depend on?

If your working on a legacy web service or application written in Node you might be looking at a lot of internal modules; ones for services, controllers, middle-ware, helpers, etc. Being legacy I mean that you have little to no tests and are looking at the daunting task of adding tests.

If you are to add proper unit tests you'll need to mock these dependencies out. But how conformable are you mocking a module not yet under test?

For me I like to find the bottom of my dependance tree, those internal modules which do not depend on any other internal module. These lower level modules are easier to test as they either require no mocking or I only have to mock third party or built in modules which I'll trust are already under test or at least stable and/or documented enough to make me feel conformable mocking their behaviour. Once I have my low level modules under test I'll feel better mocking them when testing the next level up until my entire project is under test.

Note: I'm a fan of Unit testing but to get good test coverage with reasonable comfort that regression defects will be caught early integration tests are a must. Automated tests come in layers: Start with many unit tests, followed by a number of integration tests, ending with some system tests.

Interdependent is a command line tool that lets me scan my entire project and identify all modules who have little to no internal dependencies so I can find where to start adding tests.

Tests

The Interdependent tool comes with a suite of unit tests. To run them simply run npm test. You will get a test report (XML) and a LCov code coverage HTML report ontop of the terminal output.

Contributing

Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The tool is available as open source under the terms of the ISC License.