Skip to content

🔤 A list of all the public package names on npm. Updated daily.

Notifications You must be signed in to change notification settings

loveencounterflow/all-the-package-names

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBay-npm (WIP)

Table of Contents generated with DocToc

DBay-npm (WIP)

Alas, paging doesn't seem to work:

wget --tries=inf -c -O npm-all.000001.json https://replicate.npmjs.com/_all_docs\?limit\=1000\&skip\=0
wget --tries=inf -c -O npm-all.000002.json https://replicate.npmjs.com/_all_docs\?limit\=1000\&skip\=1000

results in the same download.

Old Documentation

all-the-package-names

A list of all the public package names on npm.

Installation

npm install all-the-package-names --save

Usage

The module exports a big flat array of package names:

const names = require("all-the-package-names")

// Most-depended-on names are first. See what's popular!
names.slice(0,5)
// [
//   'mocha',
//   'chai',
//   'lodash',
//   'grunt',
//   'eslint'
// ]

names.includes('superagent')
// => true

// Check if a given package name exists
names.includes('crazy-new-package-name')
// => false

names.length
// => 286289

names.filter(name => name.includes('banana'))
// => [ 'banana', 'banana-banana', 'banana-split', ...]

// Note: This example requires node 4 or greater because it uses
// const, arrow functions, and the `includes` array/string helper.

CLI Usage

You can also use it on the command line. Newline-delimited names are piped to STDOUT:

npm i -g all-the-package-names
all-the-package-names | grep spell

⚠️ Gotchas

Note that while mixed-case package names are no longer allowed to be published to the npm registry, there are over 2800 legacy mixed-case packages, many of which have the same spelling as other existing lowercase packages. See nice-registry/mixed-case-package-names for the the full list.

To avoid the mixed-case names when working with this data, just filter them out:

const names = require('all-the-package-names')
  .filter(name => name === name.toLowerCase())

Tests

npm install
npm test

Dependencies

None

Dev Dependencies

  • dependent-counts: Get counts of how many packages depend on the given package. Works offline.
  • lodash: The modern build of lodash modular utilities.
  • ora: Elegant terminal spinner
  • package-stream: An endless stream of clean package data from the npm registry.
  • tap-spec: Formatted TAP output like Mocha's spec reporter
  • tape: tap-producing test harness for node and browsers

License

MIT

About

🔤 A list of all the public package names on npm. Updated daily.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 70.1%
  • JavaScript 21.9%
  • Shell 8.0%