all repos — stealth-developers @ 7a84b741bc2c10def09e4d5e05151d8224e8220d

src/utils/uwuify.ts (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
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);
}