Skip to content

Commit

Permalink
fixing renaming typos
Browse files Browse the repository at this point in the history
  • Loading branch information
doowb committed Mar 23, 2016
1 parent 7a8084a commit f01b43d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .verb.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Usage

```js
var NpmInfo = require('{%= name %}');
var NpmApi = require('{%= name %}');

This comment has been minimized.

Copy link
@tunnckoCore

tunnckoCore Mar 23, 2016

why not {%= varname %}?

This comment has been minimized.

Copy link
@doowb

doowb Mar 23, 2016

Author Owner

It's a class so I want PascalCase. {%= varname %} is camelCase.

This comment has been minimized.

Copy link
@jonschlinkert

jonschlinkert Mar 23, 2016

Collaborator

this is a great example of a use case for that idea I mentioned @doowb, "context expanders".

just a simple context expander that adds an object to cache.expanded with a handful of different names like, varname, alias, className etc.

This comment has been minimized.

Copy link
@tunnckoCore

tunnckoCore Mar 23, 2016

with a handful of different names like

sounds great.

edit: hmm, where's my previous comment, haha. nevermind.

```

## API
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ $ npm install npm-api --save
## Usage

```js
var NpmInfo = require('npm-api');
var NpmApi = require('npm-api');
```

## API

### [NpmInfo](index.js#L27)
### [NpmApi](index.js#L27)

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

**Example**

```js
var npm = new NpmInfo();
var npm = new NpmApi();
```

### [.view](index.js#L65)
Expand Down
26 changes: 13 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ var Maintainer = require('./lib/models/maintainer');
var Memory = require('./lib/stores/memory');

/**
* NpmInfo constructor. Create an instance to work with maintainer and repository information.
* NpmApi constructor. Create an instance to work with maintainer and repository information.
*
* ```js
* var npm = new NpmInfo();
* var npm = new NpmApi();
* ```
* @api public
*/

function NpmInfo(options) {
if (!(this instanceof NpmInfo)) {
return new NpmInfo(options);
function NpmApi(options) {
if (!(this instanceof NpmApi)) {
return new NpmApi(options);
}
Base.call(this, null, options);
this.is('npminfo');
this.is('npmapi');

this.use(utils.plugin());
this.use(utils.option());
Expand All @@ -47,7 +47,7 @@ function NpmInfo(options) {
* Extend `Base`
*/

Base.extend(NpmInfo);
Base.extend(NpmApi);

/**
* Create a new instance of `View` or get an existing instance to work
Expand All @@ -62,7 +62,7 @@ Base.extend(NpmInfo);
* @api public
*/

NpmInfo.prototype.view = function(name) {
NpmApi.prototype.view = function(name) {
if (this.has(['views', name])) {
return this.get(['views', name]);
}
Expand All @@ -85,7 +85,7 @@ NpmInfo.prototype.view = function(name) {
* @api public
*/

NpmInfo.prototype.list = function(name, view) {
NpmApi.prototype.list = function(name, view) {
var viewName = view;
if (typeof view === 'object') {
viewName = view.name;
Expand Down Expand Up @@ -116,7 +116,7 @@ NpmInfo.prototype.list = function(name, view) {
* @api public
*/

NpmInfo.prototype.repo = function(name) {
NpmApi.prototype.repo = function(name) {
if (this.has(['repos', name])) {
return this.get(['repos', name]);
}
Expand All @@ -138,7 +138,7 @@ NpmInfo.prototype.repo = function(name) {
* @api public
*/

NpmInfo.prototype.maintainer = function(name) {
NpmApi.prototype.maintainer = function(name) {
if (this.has(['maintainers', name])) {
return this.get(['maintainers', name]);
}
Expand All @@ -149,7 +149,7 @@ NpmInfo.prototype.maintainer = function(name) {
};

/**
* Exposes `NpmInfo`
* Exposes `NpmApi`
*/

module.exports = NpmInfo;
module.exports = NpmApi;

0 comments on commit f01b43d

Please sign in to comment.