npm-trends icon indicating copy to clipboard operation
npm-trends copied to clipboard

Feature request: Show number of dependencies and dependants

Open tharders opened this issue 5 years ago • 1 comments

When comparing npm packages there are two numbers that I find very helpful:

  • The number of dependencies
  • The number of dependants

When a package is not maintained very well I might still use it if it does what I need and has no or very limited dependencies.

Would be great when those two fields are included in the stats.

The data is available in the package details on npmjs.io:

  • collected.metadata.dependencies.length
  • collected.npm.dependentsCount

For example: https://api.npms.io/v2/package/react

tharders avatar Oct 25 '19 08:10 tharders

It would be even more useful to have the total number of dependencies (including transitive deps). For example [email protected] has 3 direct and 2 transitive dependencies (5 in total).

dotchev avatar May 17 '20 10:05 dotchev