Skip to content
/ pkgs Public

Fetch npm registry metadata for a list of npm package names

Notifications You must be signed in to change notification settings

zeke/pkgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkgs

Fetch npm registry metadata for a list of npm package names

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install pkgs --save

Usage

var pkgs = require("pkgs")

// Pass in an array of package names
pkgs(["ghwd", "domready", "lodash.pluck"], function(err, packages){
  console.log(err, packages)
})

// Pick some desired properties
var names = ["ghwd", "domready", "lodash.pluck"]
var options = {
  pick: ["name", "description", "repository"]
}
pkgs(names, options, function(err, packages){
  console.log(err, packages)
})

// Alternatively, omit some undesireable properties
var names = ["ghwd", "domready", "lodash.pluck"]
var options = {
  omit: ["versions", "readme"]
}
pkgs(names, options, function(err, packages){
  console.log(err, packages)
})

Tests

npm install
npm test

Dependencies

  • async: Higher-order functions and common patterns for asynchronous code
  • lodash: A utility library delivering consistency, customization, performance, & extras.
  • npm-stats: Convenience module for getting back data from an NPM registry

Dev Dependencies

  • mocha: simple, flexible, fun test framework

License

ISC

Generated by package-json-to-readme

About

Fetch npm registry metadata for a list of npm package names

Resources

Stars

Watchers

Forks

Packages

No packages published