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

npm-high-impact

v1.8.0

Published

The high-impact (popular) packages of npm

Downloads

594

Readme

npm-high-impact

Build Coverage Downloads Size

The high-impact (popular) packages of npm.

Contents

What is this?

This package exposes the names of popular packages on the public npm registry. The definition of the term popular here is the same as what npm itself calls high-impact. They classify packages as having a high impact on the ecosystem when a package meets one or more of the following conditions:

  • download count of 1 000 000 or more per week
  • depended on by 500 or more other packages

When should I use this?

Please use this for fun experiments when researching the npm registry.

Install

This package is ESM only. In Node.js (version 16+), install with npm:

npm install npm-high-impact

In Deno with esm.sh:

import {npmHighImpact} from 'https://esm.sh/npm-high-impact@1'

In browsers with esm.sh:

<script type="module">
  import {npmHighImpact} from 'https://esm.sh/npm-high-impact@1?bundle'
</script>

Use

import {npmHighImpact} from 'npm-high-impact'

console.log(npmHighImpact.length)
console.log(npmHighImpact)
8133
[
  'ansi-styles',
  'supports-color',
  'semver',
  'chalk',
  'debug',
  'has-flag',
  'tslib',
  'color-convert',
  'color-name',
  'ms',
  // …
]

API

This package exports the identifiers npmHighImpact, npmTopDependents, and npmTopDownloads. There is no default export.

npmHighImpact

List of top package names (Array<string>).

Sorted by most downloaded first. Includes (unique) packages from npmTopDependents and npmTopDownloads.

npmTopDependents

List of package names that are depended on a lot (Array<string>).

Sorted by most dependents first.

npmTopDownloads

List of package names that are downloaded a lot (Array<string>).

Sorted by most downloaded first.

Data

👉 Note: not all of these packages are popular. There are some false-positives, such that download counts can be gamed, and that libraries.io sometimes thinks that a fork of webpack or so is actually webpack.

Scripts

This repo includes several scripts to crawl different services.

All packages

script/crawl-packages.js follows an append-only database to find all the changes to things in the npm registry. We filter duplicates out, but still end up with ±2.5m “things”, which aren’t all proper packages. Later scripts will have to deal with them being missing.

The script takes like 12-18 hours to run (it finished somewhere at night). But the good news is that it’s additive: so the next time you run it, it’ll only pull in everything that changed since you last ran in.

It crawls replicate.npmjs.com.

Top downloads

script/crawl-top-download-unscoped.js and script/crawl-top-download-scoped.js look for download counts of all ±4.1m packages on the registry. Later scripts can filter the complete list to get the top packages. The script takes like 30 hours to run. About 10 hours is spent on ±3.2m unscoped packages. Another 8 or so on ±900k scoped packages (yes, sad). After filtering, the interesting data would result in about 6k packages.

It crawls the npm package download count API. Unscoped packages are crawled using the batch API to get 128 per request. Scoped packages are crawled with 20 HTTP requests at a time, as there is no batch API, and higher rates are limited by npm.

Top dependents

script/crawl-top-dependent.js looks for packages that are depended on by 500 or more other packages. The script takes like 30 minutes to run and currently gets about 3 000 packages.

It crawls the libraries.io project search API, whose results can also be browsed on the web. Crawling stops paginating when a package is seen that is depended on by less than 500 other packages.

You need an API key for libraries.io, see their API docs for more info.

Types

This package is fully typed with TypeScript. It exports no additional types.

Compatibility

This package is at least compatible with all maintained versions of Node.js. As of now, that is Node.js 16+. It also works in Deno and modern browsers.

Related

Contribute

Yes please! See How to Contribute to Open Source.

Security

This package is safe.

License

MIT © Titus Wormer