Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Feb 21, 2023
1 parent 107fd80 commit 83ce288
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = pluralize;
*/

exports.pluralization = [
[/human$/gi, '$1ens'],
[/human$/gi, 'humans'],
[/(m)an$/gi, '$1en'],
[/(pe)rson$/gi, '$1ople'],
[/(child)$/gi, '$1ren'],
Expand Down Expand Up @@ -71,10 +71,6 @@ exports.uncountables = [
];
var uncountables = exports.uncountables;

var exceptions = new Map([
['human', 'humans']
]);

/*!
* Pluralize function.
*
Expand All @@ -86,9 +82,6 @@ var exceptions = new Map([
function pluralize(str) {
var found;
str = str.toLowerCase();
if (exceptions.has(str)) {
return exceptions.get(str);
}
if (!~uncountables.indexOf(str)) {
found = rules.filter(function(rule) {
return str.match(rule[0]);
Expand Down

0 comments on commit 83ce288

Please sign in to comment.