To vowel case
There already was Sentence case, lower case, UPPER CASE, Capitalized Case, AlTeRnAtInG CaSe and Title Case.
And nOw YOU cAn dO vOwEr cAsE tOO!
function toVowelCase(text) {
return text.toLowerCase().replace(/[aeiouy]+/g, match => match.toUpperCase());
}
Updated: a correct implementation of toVowelCase
is locale-dependend. In English, the letter y
is sometimes a vowel, and at other times a consonant. The above works for the Dutch language and some other languages. Your mileage may vary.
Updated: bookmarking https://headlinecapitalization.com and https://titlecaseconverter.com.