From beaa2fc4446c68b3e2ccedaaf88724da073988da Mon Sep 17 00:00:00 2001 From: Steve Frost Date: Thu, 3 Feb 2022 14:18:19 -0600 Subject: [PATCH 1/3] add 'Selected' to words without plural --- pluralize.js | 1 + 1 file changed, 1 insertion(+) diff --git a/pluralize.js b/pluralize.js index 65dfcd5..486203a 100644 --- a/pluralize.js +++ b/pluralize.js @@ -502,6 +502,7 @@ /o[iu]s$/i, // "carnivorous" /pox$/i, // "chickpox", "smallpox" /sheep$/i + /selected$/i ].forEach(pluralize.addUncountableRule); return pluralize; From d0ea76e95bf639c9e40d677db8ae99ed521fe7d4 Mon Sep 17 00:00:00 2001 From: Steve Frost Date: Thu, 3 Feb 2022 14:21:01 -0600 Subject: [PATCH 2/3] add 'Selected' plural to tests --- test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test.js b/test.js index fc84d37..68e4a3f 100644 --- a/test.js +++ b/test.js @@ -653,6 +653,7 @@ var BASIC_TESTS = [ ['charlie', 'charlies'], ['bookie', 'bookies'], ['auntie', 'aunties'], + ['selected', 'selected'], // Prototype inheritance. ['constructor', 'constructors'], // Non-standard case. From b8d93eea9503093031c9401cabc090b7425071c9 Mon Sep 17 00:00:00 2001 From: Steve Frost Date: Thu, 3 Feb 2022 14:23:00 -0600 Subject: [PATCH 3/3] move 'Selected' to string match instead of regex --- pluralize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pluralize.js b/pluralize.js index 486203a..8f46a81 100644 --- a/pluralize.js +++ b/pluralize.js @@ -475,6 +475,7 @@ 'rice', 'salmon', 'scissors', + 'selected', 'series', 'sewage', 'shambles', @@ -502,7 +503,6 @@ /o[iu]s$/i, // "carnivorous" /pox$/i, // "chickpox", "smallpox" /sheep$/i - /selected$/i ].forEach(pluralize.addUncountableRule); return pluralize;