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

gather-package-details

v0.1.0

Published

Scan the node modules relating to a list of files to learn their license, version, and other information

Readme

gather-package-details

Given the directory of a project utilizing npm and a list of file paths, collect package information pertaining to each path.

install

npm install gather-package-details

usage

This module exports a single function, gatherPackageDetails(), which takes an options object. The following options can/must be specified:

  • projectRoot - required, path to the root of the project which is being investigated
  • modulePaths - required, an array of paths to files that should be traced back to packages
  • licenseOverrides - an optional map of license names for specific packages. The keys of this object should be formatted as name@version, and the values can be any value

The method returns a promise for the details, { project, unresolved }

  • details.project - the root package, or project package, which is the parent to all of the discovered packages. See Package for details about it's properties
  • details.unresolved - an array of the modulePaths that could not be matched to a package

examples

See the examples directory for usage:

Package

The Package class represents a node package, identified by a directory containing a package.json file. Each package has the following properties:

  • name - the name of the package
  • version - the version, read from the package.json file
  • directory - the directory where the package was found
  • licenses - An array of license identifiers which this package advertises, or the values passed in via the licenseOverrides option.
  • children - An array of sub-Packages that were found

other modules

This module is simply a wrapper around license-checker and read-package-tree, if you are looking for more low-level tools I suggest using those.