diff options
| author | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
|---|---|---|
| committer | Florian Dold <florian.dold@gmail.com> | 2019-03-27 21:01:33 +0100 |
| commit | cc97a4dd2a967e1c2273bd5f4c5f49a5bf2e2585 (patch) | |
| tree | 92c5d88706a6ffc654d1b133618d357890e7096b /node_modules/plur/index.js | |
| parent | 3771b4d6b67b34c130f3a9a1a15f42deefdb2eda (diff) | |
remove node_modules
Diffstat (limited to 'node_modules/plur/index.js')
| -rw-r--r-- | node_modules/plur/index.js | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/node_modules/plur/index.js b/node_modules/plur/index.js deleted file mode 100644 index ed3f9b06b..000000000 --- a/node_modules/plur/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; -var irregularPlurals = require('irregular-plurals'); - -module.exports = function (str, plural, count) { - if (typeof plural === 'number') { - count = plural; - } - - if (str in irregularPlurals) { - plural = irregularPlurals[str]; - } else if (typeof plural !== 'string') { - plural = (str.replace(/(?:s|x|z|ch|sh)$/i, '$&e').replace(/([^aeiou])y$/i, '$1ie') + 's') - .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 : plural; -}; |
