// adopted from: https://github.com/sindresorhus/plur
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) (MIT)
var contains = require('../regex/contains')

function plural (str, plur, count) {
  if (typeof plur === 'number') {
    count = plur
    plur = str.replace(/(?:s|x|z|ch|sh)$/i, '$&e')

    plur = contains(/(?:[aeiou])y$/i, plur)
      ? plur + 's'
      : plur.replace(/y$/i, 'ie') + 's'

    plur = plur.replace(/i?e?s$/i, function (m) {
        var isTailLowerCase = str.slice(-1) === str.slice(-1).toLowerCase()
        return isTailLowerCase ? m.toLowerCase() : m.toUpperCase()
      })
  }
  return count === 1 ? str : plur
}

module.exports = plural

@@ -136,45 +136,55 @@
 var 
-contains = require('../regex/contains
+irregularPlurals = require('./IRREGULAR-PLURALS
 ')%0A%0A
@@ -252,22 +252,16 @@
 umber') 
-%7B%0A    
 count = 
@@ -264,16 +264,116 @@
 t = plur
+%0A%0A  if (str in irregularPlurals) plur = irregularPlurals%5Bstr%5D%0A  else if (typeof plur !== 'string') %7B
 %0A    plu
@@ -376,16 +376,17 @@
  plur = 
+(
 str.repl
@@ -421,101 +421,43 @@
 e')%0A
-%0A
     
-plur = contains(/(?:%5Baeiou%5D)y$/i, plur)%0A      ? plur + 's'%0A      : plur.replace(/y$/i, '
+  .replace(/(%5B%5Eaeiou%5D)y$/i, '$1
 ie')
@@ -466,25 +466,16 @@
  's'
-%0A
+)
 %0A    
-plur = plur
+  
 .rep
@@ -661,16 +661,17 @@
  %7D)%0A  %7D%0A
+%0A
   return

update string/plural