pkgs
v1.3.0
Published
Fetch npm registry metadata for a list of npm package names
Downloads
1,094
Readme
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