(config: Naming)
| 19 | export type SelectFromListConfig<L extends object> = Sorting<L> & Naming & OutputListConfig<L> |
| 20 | |
| 21 | /** |
| 22 | * Make a decent guess as to the correct indefinite article for a word. Anything that uses this |
| 23 | * should allow a manual override for exceptions. (e.g. the prompt message for `selectFromList` |
| 24 | * is automatically generated using the item name but can be overridden with `promptMessage`) |
| 25 | */ |
| 26 | export const indefiniteArticleFor = (name: string): string => name.match(/^[aeio]/i) ? 'an' : 'a' |
no test coverage detected