0.4.0 • Published 8 years ago

npm-info v0.4.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

npm-info NPM version Build Status

Base class for downloading data from the npm registry

Install

Install with npm:

$ npm install npm-info --save

Usage

var NpmInfo = require('npm-info');

API

NpmInfo

NpmInfo constructor. Create an instance to work with maintainer and repository information.

Example

var npm = new NpmInfo();

.view

Create a new instance of View or get an existing instance to work with npm couchdb views.

Params

  • name {String}: Name of the couchdb view to work with.
  • returns {Object} View: instance

Example

var view = npm.view('byUser');

.list

Create a new instance of List or get an existing instance to work with npm couchdb list.

Params

  • name {String}: Name of the couchdb list to work with.
  • view {String|Object}: Name or instance of a view to work with.
  • returns {Object} List: instance

Example

var list = npm.list('sortCount', 'byUser');

.repo

Create an instance of a repo to work with.

Params

  • name {String}: Name of the repo as it's published to npm.
  • returns {Object}: Instance of a Repo model to work with.

Example

var repo =  npm.repo('micromatch');

.maintainer

Create an instance of a maintainer to work with.

Params

  • name {String}: Npm username of the maintainer.
  • returns {Object}: Instance of a Maintainer model to work with.

Example

var maintainer =  npm.maintainer('doowb');

Related projects

  • base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
  • download-stats: Get and calculate npm download stats for npm modules. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Brian Woodward

License

Copyright © 2016 Brian Woodward Released under the MIT license.


This file was generated by verb, v0.9.0, on March 23, 2016.