all repos — stealth-developers @ 8bee8ce3815083afdc6fb78059396adc11ac73a8

src/utils/uwuify.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
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);
}