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 🙏

© 2024 – Pkg Stats / Ryan Hefner

howfat

v0.3.8

Published

Shows how fat is a package

Downloads

1,561

Readme

howfat

Tests NPM version

Shows how fat is a package together with its dependencies

howfat

Usage

Simple

npx howfat mkdirp

Specified version or version range:

npx howfat mkdirp@^0.5.0

Local packages

cd my-project
npx howfat

npx howfat ../my-other-package

Git or github

npx howfat https://github.com/substack/node-mkdirp

npx howfat ssh://[email protected]:substack/node-mkdirp.git#0.3.4

Different reporters

Just show a simple stats:

$ npx howfat -r simple [email protected]
Dependencies: 1
Size: 41.49kb
Files: 37

as a table:

$ npx howfat -r table [email protected]
[email protected] (1 dep, 41.49kb, 37 files)
╭────────────────┬──────────────┬─────────┬───────╮
│ Name           │ Dependencies │    Size │ Files │
├────────────────┼──────────────┼─────────┼───────┤
│ [email protected] │            0 │ 20.78kb │    14 │
╰────────────────┴──────────────┴─────────┴───────╯

as a json:

$ npx howfat -r json [email protected] --space 2

{
  "package": "[email protected]",
  "dependencyCount": 1,
  "fileCount": 37,
  "unpackedSize": 42486,
  "duplicate": false,
  "error": false,
  "unmet": false,
  "author": "{name:James Halliday,email:[email protected],url:http://substack.net}",
  "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
  "description": "Recursively mkdir, like `mkdir -p`",
  "license": "MIT",
  "maintainers": "[{name:isaacs,email:[email protected]}]",
  "ownStats": {
    "dependencyCount": 1,
    "fileCount": 23,
    "unpackedSize": 21212
  },
  "children": [
    {
      "package": "[email protected]",
      "dependencyCount": 0,
      "fileCount": 14,
      "unpackedSize": 21274,
      "duplicate": false,
      "error": false,
      "unmet": false,
      "author": "{name:James Halliday,email:[email protected],url:http://substack.net}",
      "deprecated": "",
      "description": "parse argument options",
      "license": "MIT",
      "maintainers": "[{email:[email protected],name:ljharb},{email:[email protected],name:emilbayes}]",
      "ownStats": {
        "dependencyCount": 1,
        "fileCount": 14,
        "unpackedSize": 21274
      },
      "children": []
    }
  ]
}

Other options

  -d, --dev-dependencies BOOLEAN   Fetch dev dependencies, default false
  -p, --peer-dependencies BOOLEAN  Fetch peer dependencies, default false
  
  -r, --reporter STRING            'json', 'simple', 'table', 'tree', default tree
      --fields STRING              Displayed fields separated by a comma:
                                   dependencies,size,files,license,
                                   author,description,maintainers,deprec,
                                   deprecated,node,os,platform
      --sort STRING                Sort field. Add minus sign for 
                                   desc order, like size-. Default to 'name'
      --space NUMBER               Use spaces in json output, default null
                                   
  -v, --verbose BOOLEAN            Show additional logs
      --no-colors BOOLEAN          Prevent color output
      --no-human-readable BOOLEAN  Show size in bytes
      
  --registry-url STRING            Default to https://registry.npmjs.org/
                            
  --http                           Node.js RequestOptions, like:
  --http.timeout NUMBER            Request timeout in ms, default 10000
  --http.connection-limit NUMBER   Max simultaneous connections, default 10
  --http.retry-count NUMBER        Try to fetch again of failure, default 5
  --http.proxy STRING              A proxy server url
  
  --show-config                    Show the current configuration
  --version                        Show howfat version
  --help                           Show this help

Accuracy

Different package managers use different dependency resolution algorithms. Even different versions of the same manager will resolve different dependency tree. So, this package tries to calculate stats similar to npm, but keep in mind that it provides approximate results.

Why should I care about my package size?

  • Small package is installed much faster on CI
  • Runs faster via npx
  • Less dependencies = less troubles