-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The conditional as written never slices 'es' since a word cannot end with es and also end with 'x' | 'ch' | 'ss' | 'sh':
directus-sdk-typegen/src/utils.ts
Lines 24 to 26 in 13ce166
| if (word.endsWith('es') && ['ch', 'sh', 'ss', 'x'].some((ending) => word.endsWith(ending))) { | |
| return word.slice(0, -2); | |
| } |
leaving the word to be handled by:
directus-sdk-typegen/src/utils.ts
Lines 32 to 34 in 13ce166
| if (word.endsWith('s') && !word.endsWith('ss') && word.length > 3) { | |
| return word.slice(0, -1); | |
| } |
Output
| Field Name | Current Output | Expected Output |
|---|---|---|
boxes |
Boxe |
Box |
sandwiches |
Sandwiche |
Sandwich |
dresses |
Dresse |
Dress |
wishes |
Wishe |
Wish |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels