Browse files

Singularize before attempting a Pluralize

  • Loading branch information...
1 parent ca62211 commit e3492571989d34508c01557eb87b9b7c3b894069 @Qard committed Jul 25, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 index.js
View
3 index.js
@@ -12,6 +12,9 @@
// Make singular words plural.
exports.plural = function(str, keep_case) {
var s = this.trim(str);
+
+ // It's easier to avoid multipluralization by singularizing first.
+ s = this.singular(str);
if ( ! keep_case) { s = s.toLowerCase(); }
switch (s.substr(-1)) {
case 'y':

0 comments on commit e349257

Please sign in to comment.