npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vowelz

v3.2.0

Published

Vowelz is a lightweight javascript/typescript library designed for efficient and flexiable manipulation of vowels within strings

Readme

v2-banner npm downloads license

Vowelz

A tiny, tested, type-safe vowel processing toolkit for modern JavaScript. Supports ES6 style imports, Node.js 18+ with named exports. Fully unit tested with Jest. 🚨 Vowelz 3.x.x is a complete rewrite. If you were using a previous version (2.0.0 or older), you must migrate your imports and usage. This version introduces breaking changes:

  1. Switched from class-based API → functional API
  2. Switched from CommonJS → ES Modules (ESM)
  3. Node.js version requirement is now 18+
  4. Flat named exports instead of instance methods

📦 Installation

npm install vowelz

🎒 Features

  1. Tiny and dependency-free
  2. Fully unit tested with Jest
  3. Type-safe (TypeScript support out of the box)
  4. Focused vowel manipulation utilities

💻 Available Functions

  1. countAllVowels
  2. getTotalCount
  3. getCountOfUniqueVowels
  4. extractAllVowelsFromString
  5. getPositionsOfVowels
  6. setAllVowelsToUpperCase
  7. setAllVowelsToLowerCase
  8. replaceVowelsWithCharacter
  9. removeAllVowelsFromString
  10. encryptAllVowels

🔤 Example Usage

  1. 📁 Count All Vowels
/* Counts every vowel occurrence in a string. */
import { countAllVowels } from 'vowelz';
const result = countAllVowels('hello');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  count: {
    a: 0,
    e: 1,
    i: 0,
    o: 1,
    u: 0
  }
}
*/
  1. 📁 Encrypt All Vowels
import { encryptAllVowels } from 'vowelz';
const result = encryptAllVowels('hello');
console.log(result);

/*
Expected Output:
{ input: "hello", encrypted: "h3ll0" }
*/
  1. 📁 Extract All Vowels From String
import { extractAllVowelsFromString } from 'vowelz';
const result = extractAllVowelsFromString('hello');
console.log(result);

/*
Expected Ouput:
{
  input: "hello",
  extract: ["e", "o"]
}
*/
  1. 📁 Get Count Of Unique Vowels
import { getCountOfUniqueVowels } from 'vowelz';
const result = getCountOfUniqueVowels('beautiful');
console.log(result);

/*
Expected Output:
{ input: "beautiful", unique: 4 }
*/
  1. 📁 Get Position Of Vowels
import { getPositionsOfVowels } from 'vowelz';
const result = getPositionsOfVowels('hello');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  positions: [1, 4]
}
*/
  1. 📁 Get Total Count
import { getTotalCountOfVowels } from 'vowelz';
const result = getTotalCountOfVowels('hello');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  total: 2
}
*/
  1. 📁 Remove All Vowels From String
import { removeAllVowelsFromString } from 'vowelz';
const result = removeAllVowelsFromString('hello');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  removed: "hll"
}
*/
  1. 📁 Replace Vowels With Character
import { replaceVowelsWithCharacter } from 'vowelz';
const result = replaceVowelsWithCharacter('hello', '*');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  mutated: "h*ll*"
}
*/
  1. 📁 Set All Vowels To Lower Case
import { setAllVowelsToLowerCase } from 'vowelz';
const result = setAllVowelsToLowerCase('HELLO');
console.log(result);

/*
Expected Output:
{
  input: "HELLO",
  lower: "HeLLo"
}
*/
  1. 📁 Set All Vowels To Upper Case
import { setAllVowelsToUpperCase } from 'vowelz';
const result = setAllVowelsToUpperCase('hello');
console.log(result);

/*
Expected Output:
{
  input: "hello",
  upper: "hEllO"
}
*/

📗 Test Coverage

PASS tests/count-all-vowels.test.ts
PASS tests/encrypt-all-vowels.test.ts
PASS tests/extract-all-vowels-from-string.test.ts
PASS tests/get-count-of-unique-vowels.test.ts
PASS tests/get-positions-of-vowels.test.ts
PASS tests/get-total-count.test.ts
PASS tests/remove-all-vowels-from-string.test.ts
PASS tests/replace-vowels-with-character.test.ts
PASS tests/set-all-vowels-to-lower-case.test.ts
PASS tests/set-all-vowels-to-upper-case.test.ts

Test Suites: 10 passed, 10 total
Tests:       50 passed, 50 total
Snapshots:   0 total
--------------------------------|---------|----------|---------|---------|-------------------
File                            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
--------------------------------|---------|----------|---------|---------|-------------------
All files                       |     100 |    97.67 |     100 |     100 |
 count-all-vowels               |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 encrypt-all-vowels             |     100 |       80 |     100 |     100 | 21
  index.ts                      |     100 |       80 |     100 |     100 | 21
 extract-all-vowels-from-string |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 get-count-of-unique-vowels     |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 get-positions-of-vowels        |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 get-total-count                |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 remove-all-vowels-from-string  |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 replace-vowels-with-character  |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 set-all-vowels-to-lower-case   |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
 set-all-vowels-to-upper-case   |     100 |      100 |     100 |     100 |
  index.ts                      |     100 |      100 |     100 |     100 |
--------------------------------|---------|----------|---------|---------|-------------------

📘 Contributing

Contributions, suggestions, and improvements are welcome. Feel free to open issues or pull requests.

❤️ Support

Like this project? Support it with a github star, it would mean a lot to me! Cheers and Happy Coding.