Tiny library for working with vowels.
Install
$ npm install vowel
Usage
const vowel = ; const vowels = vowel;//=> ['a', 'e', 'i', 'o', 'u'] const isVowel = vowel;;//=> true const includesVowel = vowel;;//=> false const startsWithVowel = vowel;;//=> false const endsWithVowel = vowel;;//=> true
API
.vowels
Returns an array
with a list of vowels.
boolean
)
.y(If whether y
should be included as a vowel.
string
)
.isVowel(If string is a single character, returns whether the string is a vowel. If string is longer than a single character, calls .includesVowel
.
string
)
.includesVowel(Returns whether the string includes vowels.
string
)
.startsWithVowel(Returns whether the string starts with a vowel.
string
)
.endsWithVowel(Returns whether the string ends with a vowel.