mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-22 21:46:31 +08:00
impr: remove words which might trigger false positives for profanity
This commit is contained in:
parent
d7273ec9a0
commit
9b8c452064
1 changed files with 4 additions and 2 deletions
|
@ -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)) || [];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue