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