Skip to content

Commit

Permalink
Replace lingo with pluralize module.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmingoia committed Jan 20, 2015
1 parent 45f6cfe commit 98a57b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions lib/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Dependencies
*/

var compose = require('koa-compose')
, defaults = require('defaults')
, lingo = require('lingo')
, pathToRegExp = require('path-to-regexp');
var compose = require('koa-compose');
var defaults = require('defaults');
var pluralize = require('pluralize');
var pathToRegExp = require('path-to-regexp');

/**
* Expose `Resource`
Expand Down Expand Up @@ -37,7 +37,7 @@ function Resource(name, actions, options) {
options = options || {};
this.name = typeof name == 'string' ? name : null;

this.id = name ? lingo.en.singularize(name) : 'id';
this.id = this.name ? pluralize.singular(name) : 'id';
this.base = this.name ? '/' + this.name : '/';

var middleware = Array.prototype.slice.call(arguments, this.name ? 1 : 0);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"main": "./lib/resource.js",
"dependencies": {
"debug": "^0.7.4",
"lingo": "0.0.5",
"path-to-regexp": "0.0.2",
"defaults": "~1.0.0",
"koa-compose": "~2.2.0"
"koa-compose": "~2.2.0",
"path-to-regexp": "0.0.2",
"pluralize": "^1.1.1"
},
"devDependencies": {
"koa": "0.3.0",
Expand Down

0 comments on commit 98a57b9

Please sign in to comment.