🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

couchpkgs

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchpkgs

Grab a list of all packages in a npm couch database

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

couchpkgs

A helper to get all packages from a npm registry. Written mainly for usage with smart-private-npm

Install

$ npm install couchpkgs

Test

$ npm test

Usage

var couchpkgs = require('couchpkgs')

API

getPkgs(opts, cb)

Params
NameTypeDescription
optsObjectOptions
cbFunctionfunction(err, pkgs)

Opts can contain the following keys:

  • registry {String} required
  • fullUrl {Boolean} don't modify the registry url
  • filter {Function} filters the results (should return true/false)

NOTE: If fullUrl is true, the url should point to //_all_docs

Example
var opts = {
    registry: 'https://npm.curapps.com'
  , filter: function(a) {
    return (~a.indexOf('pkg'))
  }
}

couchpkgs.getPkgs(opts, function(err, res) {
  if (err) throw err
  console.log(res)
  // => ['pkg-1', 'pkg-2']
})

License

MIT

Author

Evan Lucas

Keywords

couch

FAQs

Package last updated on 11 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts