Retrieve the metadata for every package on NPM and store it in a level* database
Retrieve the metadata for every package on NPM and store it in a level* database. Once you've acquired the data, you can then run your own manual queries over it very quickly and without hitting the registry.
The initial sync takes a long time, but this module only downloads the most recent changes not already stored - so after the first run it should be relatively speedy.
Takes a level* database
db and returns a modified one for querying. Once
synced, each package is stored in
metadb by their name - so you could do
this to get the metdata for the disc module:
var db = __dirname + '/npm-meta'var metadata =var sublevel =var metadb =metadb
Sync with the NPM registry, optionally passing the
finished callback for when
the process is complete. This must be done at least once before you can access
When syncing, an initial pass is done over a complete list of packages in the
found event is emitted once for each module in the list.
After the first pass, a second pass will retrieve and store the metadata for
each out of date package. When retrieved, the module data is emitted under
Emitted when the whole process is complete.
MIT. See LICENSE.md for details.