- Simple NPM Package to check if string contains vowels
- ♻️ Works seamlessly with
CommonJS,ESMandTypeScript - See examples below
Install via NPM
$ npm i contains-vowels
- Returns a
Booleanindicating whetherstringcontains vowels.
const containsVowels = require('contains-vowels');
const textWithVowels = 'Test string here!';
if (containsVowels(textWithVowels)) {
console.log('Text contains one or more vowels!');
}import containsVowels from 'contains-vowels';
const textWithVowels = 'Test string here!';
if (containsVowels(textWithVowels)) {
console.log('Text contains one or more vowels!');
}import containsVowels from 'contains-vowels';
const textWithVowels: string = 'Test string here!';
if (containsVowels(textWithVowels)) {
console.log('Text contains one or more vowels!');
}