all repos — stealth-developers @ 6ac5bc72ec4532c8740a8eb324b23149192c2a80

src/utils/uwuify.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
import Uwuifier from "uwuifier";

export function uwuify(input: string) {
	const uwuifier = new Uwuifier();
	const uwuifiedContent = input ? uwuifier.uwuifySentence(input) : "";

	const blacklistedWords = [
		"twerks",
		"sees bulge",
		"notices buldge",
		"starts twerking",
		"wank",
	];

	return blacklistedWords.reduce((acc, word) => {
		return acc.replace(new RegExp(word, "gi"), "----");
	}, uwuifiedContent);
}