Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pluralize.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
['yes', 'yeses'],
['foot', 'feet'],
['eave', 'eaves'],
['goose', 'geese'],
['tooth', 'teeth'],
['quiz', 'quizzes'],
['human', 'humans'],
Expand Down Expand Up @@ -354,6 +353,7 @@
[/(x|ch|ss|sh|zz)$/i, '$1es'],
[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i, '$1ices'],
[/\b((?:tit)?m|l)(?:ice|ouse)$/i, '$1ice'],
[/\b((?:g)?g)(?:eese|oose)$/i, '$1eese'],
[/(pe)(?:rson|ople)$/i, '$1ople'],
[/(child)(?:ren)?$/i, '$1ren'],
[/eaux$/i, '$0'],
Expand Down Expand Up @@ -390,7 +390,8 @@
[/(pe)(rson|ople)$/i, '$1rson'],
[/(child)ren$/i, '$1'],
[/(eau)x?$/i, '$1'],
[/men$/i, 'man']
[/men$/i, 'man'],
[/geese$/i, 'goose']
].forEach(function (rule) {
return pluralize.addSingularRule(rule[0], rule[1]);
});
Expand Down Expand Up @@ -505,4 +506,4 @@
].forEach(pluralize.addUncountableRule);

return pluralize;
});
});
3 changes: 2 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ var BASIC_TESTS = [
['zero', 'zeros'],
['quest', 'quests'],
['goose', 'geese'],
['canada goose', 'canada geese'],
['foot', 'feet'],
['ex', 'exes'],
['reflex', 'reflexes'],
Expand Down Expand Up @@ -833,4 +834,4 @@ describe('pluralize', function () {
expect(pluralize.singular('mornings')).to.equal('suck');
});
});
});
});