vowel

0.0.3 • Public • Published

Vowel npm version

Tiny library for working with vowels.

Install

$ npm install vowel

Usage

const vowel = require('vowel');
 
const { vowels } = vowel;
//=> ['a', 'e', 'i', 'o', 'u']
 
const { isVowel } = vowel;
isVowel('o');
//=> true
 
const { includesVowel } = vowel;
includesVowel('rhythms');
//=> false
 
const { startsWithVowel } = vowel;
startsWithVowel('xylophone');
//=> false
 
const { endsWithVowel } = vowel;
endsWithVowel('persiflage');
//=> true

API

.vowels

Returns an array with a list of vowels.

.y(boolean)

If whether y should be included as a vowel.

.isVowel(string)

If string is a single character, returns whether the string is a vowel. If string is longer than a single character, calls .includesVowel.

.includesVowel(string)

Returns whether the string includes vowels.

.startsWithVowel(string)

Returns whether the string starts with a vowel.

.endsWithVowel(string)

Returns whether the string ends with a vowel.

Package Sidebar

Install

npm i vowel

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

3.28 kB

Total Files

4

Last publish

Collaborators

  • paco