Spaces:
Running
Running
Commit
•
8b547c3
1
Parent(s):
d0c63f4
improvements
Browse files
src/lib/fun-words/filterSensitiveContent.ts
CHANGED
@@ -65,6 +65,7 @@ export const sensitiveTopics = [
|
|
65 |
"hatchet",
|
66 |
"beggar",
|
67 |
"indian",
|
|
|
68 |
"corrupted",
|
69 |
"russian",
|
70 |
"italian",
|
@@ -77,5 +78,5 @@ export const sensitiveTopics = [
|
|
77 |
]
|
78 |
|
79 |
export function filterSensitiveContent(words: string[], badWords: string[] = sensitiveTopics): string[] {
|
80 |
-
return words.filter(x => !badWords.
|
81 |
}
|
|
|
65 |
"hatchet",
|
66 |
"beggar",
|
67 |
"indian",
|
68 |
+
"japanese",
|
69 |
"corrupted",
|
70 |
"russian",
|
71 |
"italian",
|
|
|
78 |
]
|
79 |
|
80 |
export function filterSensitiveContent(words: string[], badWords: string[] = sensitiveTopics): string[] {
|
81 |
+
return words.filter(x => !badWords.some(y => y.toLowerCase().startsWith(x.toLowerCase().trim())))
|
82 |
}
|