contains-vowels

🗣️ NPM Package to check if string contains vowels


Keywords
vowels, string, text, contains, check, utility, helper, javascript, npm
License
MIT
Install
npm install contains-vowels@1.1.5

Documentation

contains-vowels

  • Simple NPM Package to check if string contains vowels
  • ♻️ Works seamlessly with CommonJS, ESM and TypeScript
  • See examples below

Install via NPM

$ npm i contains-vowels

Usage

  • Returns a Boolean indicating whether string contains 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!');
}