Socket
Socket
Sign inDemoInstall

npm-api

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-api - npm Package Compare versions

Comparing version 0.4.9 to 0.4.10

4

index.js
/*!
* npm-api <https://github.com/doowb/npm-api>
*
* Copyright (c) 2016, Brian Woodward.
* Licensed under the MIT License.
* Copyright (c) 2015-2017, Brian Woodward.
* Released under the MIT License.
*/

@@ -7,0 +7,0 @@

@@ -12,6 +12,6 @@ /*!

registry: 'https://registry.npmjs.org/',
url: 'https://skimdb.npmjs.com/registry/_design/app/',
url: 'https://replicate.npmjs.com/registry/_design/app/',
protocol: 'https',
host: 'skimdb.npmjs.com',
host: 'replicate.npmjs.com',
pathname: 'registry/_design/app'
};

@@ -74,2 +74,5 @@ /*!

Registry.prototype.url = function(name) {
if (name[0] === '@' && name.indexOf('/') !== -1) {
name = '@' + encodeURIComponent(name.slice(1));
}
return this.config.registry += name;

@@ -76,0 +79,0 @@ };

{
"name": "npm-api",
"description": "Base class for retrieving data from the npm registry.",
"version": "0.4.9",
"version": "0.4.10",
"homepage": "https://github.com/doowb/npm-api",

@@ -6,0 +6,0 @@ "author": "Brian Woodward (https://github.com/doowb)",

@@ -1,2 +0,2 @@

# npm-api [![NPM version](https://img.shields.io/npm/v/npm-api.svg?style=flat)](https://www.npmjs.com/package/npm-api) [![NPM downloads](https://img.shields.io/npm/dm/npm-api.svg?style=flat)](https://npmjs.org/package/npm-api) [![Linux Build Status](https://img.shields.io/travis/doowb/npm-api.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/npm-api)
# npm-api [![NPM version](https://img.shields.io/npm/v/npm-api.svg?style=flat)](https://www.npmjs.com/package/npm-api) [![NPM monthly downloads](https://img.shields.io/npm/dm/npm-api.svg?style=flat)](https://npmjs.org/package/npm-api) [![NPM total downloads](https://img.shields.io/npm/dt/npm-api.svg?style=flat)](https://npmjs.org/package/npm-api) [![Linux Build Status](https://img.shields.io/travis/doowb/npm-api.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/npm-api) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/npm-api.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/npm-api)

@@ -35,2 +35,7 @@ > Base class for retrieving data from the npm registry.

**Params**
* `name` **{String}**: Name of the couchdb view to work with.
* `returns` **{Object}** `View`: instance
**Example**

@@ -42,7 +47,2 @@

**Params**
* `name` **{String}**: Name of the couchdb view to work with.
* `returns` **{Object}** `View`: instance
### [.list](index.js#L88)

@@ -52,2 +52,8 @@

**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**

@@ -59,8 +65,2 @@

**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
### [.repo](index.js#L119)

@@ -70,2 +70,7 @@

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

@@ -77,7 +82,2 @@

**Params**
* `name` **{String}**: Name of the repo as it's published to npm.
* `returns` **{Object}**: Instance of a `Repo` model to work with.
### [.maintainer](index.js#L142)

@@ -87,2 +87,7 @@

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

@@ -94,7 +99,2 @@

**Params**
* `name` **{String}**: Npm username of the maintainer.
* `returns` **{Object}**: Instance of a `Maintainer` model to work with.
## Models

@@ -114,2 +114,7 @@

**Params**
* `name` **{String}**: Name of the npm maintainer to get information about.
* `store` **{Object}**: Optional cache store instance for caching results. Defaults to a memory store.
**Example**

@@ -121,7 +126,2 @@

**Params**
* `name` **{String}**: Name of the npm maintainer to get information about.
* `store` **{Object}**: Optional cache store instance for caching results. Defaults to a memory store.
### [.repos](lib/models/maintainer.js#L56)

@@ -131,2 +131,4 @@

* `returns` **{Promise}**: Returns array of repository names when promise resolves.
**Example**

@@ -143,4 +145,2 @@

* `returns` **{Promise}**: Returns array of repository names when promise resolves.
### [Repo](lib/models/repo.js#L26)

@@ -150,2 +150,7 @@

**Params**
* `name` **{String}**: Name of the npm repo to get information about.
* `store` **{Object}**: Optional cache store instance for caching results. Defaults to a memory store.
**Example**

@@ -157,7 +162,2 @@

**Params**
* `name` **{String}**: Name of the npm repo to get information about.
* `store` **{Object}**: Optional cache store instance for caching results. Defaults to a memory store.
### [.package](lib/models/repo.js#L57)

@@ -167,2 +167,4 @@

* `returns` **{Promise}**: Returns the package.json object when promise resolves.
**Example**

@@ -179,4 +181,2 @@

* `returns` **{Promise}**: Returns the package.json object when promise resolves.
### [.version](lib/models/repo.js#L89)

@@ -186,2 +186,7 @@

**Params**
* `version` **{String}**: Specific version to retrieve.
* `returns` **{Promise}**: Returns the package.json object for the specified version when promise resolves.
**Example**

@@ -198,7 +203,2 @@

**Params**
* `version` **{String}**: Specific version to retrieve.
* `returns` **{Promise}**: Returns the package.json object for the specified version when promise resolves.
### [.dependencies](lib/models/repo.js#L118)

@@ -208,2 +208,7 @@

**Params**
* `version` **{String}**: Specific version to retrieve. Defaults to `latest`.
* `returns` **{Promise}**: Returns the dependencies object for the specified version when promise resolves.
**Example**

@@ -220,11 +225,11 @@

### [.devDependencies](lib/models/repo.js#L138)
Get the repo's devDependencies for the specified version.
**Params**
* `version` **{String}**: Specific version to retrieve. Defaults to `latest`.
* `returns` **{Promise}**: Returns the dependencies object for the specified version when promise resolves.
* `returns` **{Promise}**: Returns the devDependencies object for the specified version when promise resolves.
### [.devDependencies](lib/models/repo.js#L138)
Get the repo's devDependencies for the specified version.
**Example**

@@ -241,11 +246,12 @@

### [.prop](lib/models/repo.js#L159)
Get the specified property from the repo's package.json for the specified version.
**Params**
* `prop` **{String}**: Name of the property to get.
* `version` **{String}**: Specific version to retrieve. Defaults to `latest`.
* `returns` **{Promise}**: Returns the devDependencies object for the specified version when promise resolves.
* `returns` **{Promise}**: Returns the property for the specified version when promise resolves.
### [.prop](lib/models/repo.js#L159)
Get the specified property from the repo's package.json for the specified version.
**Example**

@@ -262,8 +268,2 @@

**Params**
* `prop` **{String}**: Name of the property to get.
* `version` **{String}**: Specific version to retrieve. Defaults to `latest`.
* `returns` **{Promise}**: Returns the property for the specified version when promise resolves.
## Registry queries

@@ -275,2 +275,7 @@

**Params**
* `name` **{String}**: Name of couchdb view to use.
* `returns` **{Object}**: instance of `View`
**Example**

@@ -282,7 +287,2 @@

**Params**
* `name` **{String}**: Name of couchdb view to use.
* `returns` **{Object}**: instance of `View`
### [.query](lib/view.js#L51)

@@ -292,2 +292,7 @@

**Params**
* `params` **{Object}**: URL query parameters to pass along to the couchdb view.
* `returns` **{Promise}**: Results of the query when promise is resolved.
**Example**

@@ -304,11 +309,11 @@

### [.stream](lib/view.js#L91)
Query the couchdb view with the provided parameters and return a stream of results.
**Params**
* `params` **{Object}**: URL query parameters to pass along to the couchdb view.
* `returns` **{Promise}**: Results of the query when promise is resolved.
* `returns` **{Stream}**: Streaming results of the query.
### [.stream](lib/view.js#L91)
Query the couchdb view with the provided parameters and return a stream of results.
**Example**

@@ -323,7 +328,2 @@

**Params**
* `params` **{Object}**: URL query parameters to pass along to the couchdb view.
* `returns` **{Stream}**: Streaming results of the query.
### [.url](lib/view.js#L105)

@@ -342,2 +342,8 @@

**Params**
* `name` **{String}**: Name of couchdb list to use.
* `view` **{Object}**: Instance of a View to use with the list.
* `returns` **{Object}**: instance of `List`
**Example**

@@ -349,8 +355,2 @@

**Params**
* `name` **{String}**: Name of couchdb list to use.
* `view` **{Object}**: Instance of a View to use with the list.
* `returns` **{Object}**: instance of `List`
### [.query](lib/list.js#L53)

@@ -360,2 +360,7 @@

**Params**
* `params` **{Object}**: URL query parameters to pass along to the couchdb list.
* `returns` **{Promise}**: Results of the query when promise is resolved.
**Example**

@@ -372,7 +377,2 @@

**Params**
* `params` **{Object}**: URL query parameters to pass along to the couchdb list.
* `returns` **{Promise}**: Results of the query when promise is resolved.
### [.url](lib/list.js#L80)

@@ -391,3 +391,3 @@

* [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.")
* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks")
* [download-stats](https://www.npmjs.com/package/download-stats): Get and calculate npm download stats for npm modules. | [homepage](https://github.com/doowb/download-stats "Get and calculate npm download stats for npm modules.")

@@ -401,8 +401,8 @@

_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
To generate the readme, run the following command:
```sh
$ npm install -g verb verb-generate-readme && verb
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

@@ -412,6 +412,6 @@

Install dev dependencies:
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install -d && npm test
$ npm install && npm test
```

@@ -424,11 +424,11 @@

* [github/doowb](https://github.com/doowb)
* [twitter/doowb](http://twitter.com/doowb)
* [twitter/doowb](https://twitter.com/doowb)
### License
Copyright © 2016, [Brian Woodward](https://github.com/doowb).
Released under the [MIT license](LICENSE).
Copyright © 2017, [Brian Woodward](https://github.com/doowb).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on November 13, 2016._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 27, 2017._

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc