* Step 1c: Handle -y endings
(word: string)
| 139 | * Step 1c: Handle -y endings |
| 140 | */ |
| 141 | function step1c(word: string): string { |
| 142 | if (word.endsWith("y")) { |
| 143 | const stem = word.slice(0, -1); |
| 144 | if (containsVowel(stem)) { |
| 145 | return stem + "i"; |
| 146 | } |
| 147 | } |
| 148 | return word; |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * Step 2: Handle various suffixes with measure > 0 |
no test coverage detected