Skip to content

Commit

Permalink
Update checkSexual.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanat05 authored Jun 3, 2022
1 parent d7d09f2 commit faf52f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/checkSexual.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function sexual(text: string|any): boolean {
if(!text) throw new Error('Korean: 확인할 텍스트를 입력해 주세요');
if(!text) throw new Error('Korcen: 확인할 텍스트를 입력해 주세요');
if(typeof text !== 'string') throw new Error('Korean: String 타입만 입력 가능합니다');
const newtext = text.toLowerCase()
text = newtext.replace(/[^-]/gi, '')
Expand Down Expand Up @@ -70,15 +70,15 @@ export function sexual(text: string|any): boolean {
text = text.replace(/sex/gi, '섹스')
text = text.replace(//gi, '')
text = text.replace(/[^-]/gi, '')
const sex = ["ㅅㅔㄱ스", "섹ㅅ", "ㅅ스", "세ㄱㅅ", "ㅅㅔㄱㅅ"]
const sex = ["ㅅㅔㄱ스", "섹ㅅ", "ㅅ스", "세ㄱㅅ", "ㅅㅔㄱㅅ","야플"]
for (const i of sex) {
if (text.includes(i)) {
return true;
}
}
text = newtext.replace(/[^-]/gi, '')
text = text.replace(//gi, '')
const sex2 = ["섹스", "섻스", "쉑스", "섿스", "섹그", "야스", "색스", "셱스", "섁스", "세엑스", "썩스"]
const sex2 = ["섹스", "섻스", "쉑스", "섿스", "섹그", "야스", "색스", "셱스", "섁스", "세엑스", "썩스","sex","Sex","ㅅㅅ"]
for (const i of sex2) {
if (text.includes(i)) {
return true;
Expand Down Expand Up @@ -112,7 +112,7 @@ export function sexual(text: string|any): boolean {

text = newtext.replace(/[^-]/gi, '')
const onahole4 = ["자궁문신"]
for (const i of onahole) {
for (const i of onahole4) {
if (text.includes(i)) {
return true;
}
Expand All @@ -127,4 +127,4 @@ export function sexual(text: string|any): boolean {
}

return false;
}
}

0 comments on commit faf52f0

Please sign in to comment.