impr: remove words which might trigger false positives for profanity

This commit is contained in:
Miodec 2023-11-08 14:37:48 +00:00
parent d7273ec9a0
commit 9b8c452064

View file

@ -171,7 +171,6 @@ export const profanities = [
"sadist",
"scank",
"schlong",
"screwing",
"semen",
"sex",
"sexy",
@ -378,7 +377,6 @@ export const profanities = [
"scheiss",
"schlampe",
"schmuck",
"screw",
"sh!t",
"sharmuta",
"sharmute",
@ -406,3 +404,7 @@ export const regexProfanities = profanities.map((profanity) => {
const normalizedProfanity = _.escapeRegExp(profanity.toLowerCase());
return `${normalizedProfanity}.*`;
});
export function findProfanities(string: string): string[] {
return profanities.filter((profanity) => string.includes(profanity)) || [];
}