Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @returns The processed string with vowels replaced.
* @throws {Error} If mask is not a non-empty string.
*/
export function muteVowels(input: string, mask: string): string {
export function muteVowels(input: string, mask: string = '*'): string {
if (typeof input !== 'string') {
throw new Error('Input must be a string');
}
Expand All @@ -24,7 +24,7 @@ export function muteVowels(input: string, mask: string): string {
* Replaces all specified vowels in the input string with the specified mask character.
* @param input The string to process.
* @param mask The character to replace vowels with.
* @param vowels The array of vowels to replace (each must be a single character string).
* @param vowels The array of vowels to replace (each must be a single-character string).
* @returns The processed string with specified vowels replaced.
* @throws {Error} If mask is not a non-empty string, or vowels is not a valid array of single-character strings.
*/
Expand Down