getpackages

Fetch the information for packages inside the npm registry

Get Packages

Fetch the information for packages inside the npm registry

Node, Browserify

  • Use: require('getpackages')
  • Install: npm install --save getpackages

Ender

  • Use: require('getpackages')
  • Install: ender add getpackages
// Create our instance 
var getter = require('getpackages').create({
    onlyLatest: true,           // optional (defaults to `true`), accepts a boolean, `true` will fetch information only for the latest version, `false` wil fetch information for all versions 
    log: console.log           // optional (defaults to `null`), accepts a function that accepts the arguments: level, message...  
});
 
// Fetch the data on these github repositories 
getter.fetchPackagesByNames(['bevry/getpackages'], function(errentries){
    console.log(err, entries);
 
    // Fetch all the repo data on these github users/organisations 
    getter.fetchPackagesByKeyword('docpad-plugin', function(errentries){
        console.log(err, entries);
 
        // Get the combined listing 
        console.log(getter.getEntries());
    });
});
  • When onlyLatest is true, entry data is retrieved from: http://registry.npmjs.org/#{packageName}/latest
  • When onlyLatest is false, entry data is retrieved from: http://registry.npmjs.org/#{packageName}

Discover how you can contribute by heading on over to the Contributing.md file.

Discover the change history by heading on over to the History.md file.

These amazing people are maintaining this project:

  • Benjamin Lupton b@lupton.cc (https://github.com/balupton)

No sponsors yet! Will you be the first?

No contributors yet! Will you be the first? Discover how you can contribute by heading on over to the Contributing.md file.

Licensed under the incredibly permissive MIT license

Copyright © 2013+ Bevry Pty Ltd us@bevry.me (http://bevry.me)