Skip to content

Commit

Permalink
0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
erukim committed Jun 4, 2022
1 parent ec7ad5f commit 79e3fbb
Show file tree
Hide file tree
Showing 10 changed files with 975 additions and 105 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "korcen",
"description": "한국어 비속어 검열",
"version": "0.1.4",
"version": "0.1.5",
"main": "dist/index.js",
"license" : "GNU General Public License v3.0",
"scripts": {
Expand Down
509 changes: 468 additions & 41 deletions src/checkBadLang.ts

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/checkBelittle.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function belittle(text: string|any): boolean {
if(!text) throw new Error('Korean: 확인할 텍스트를 입력해 주세요');
if(typeof text !== 'string') throw new Error('Korcen: String 타입만 입력 가능합니다');
export function belittle(text: string | any): boolean {
if (!text) throw new Error('Korean: 확인할 텍스트를 입력해 주세요');
if (typeof text !== 'string') throw new Error('Korcen: String 타입만 입력 가능합니다');
const newtext = text.toLowerCase()
text = newtext.replace(//gi, '년')
text = text.replace(//gi, '년')
Expand All @@ -9,8 +9,10 @@ export function belittle(text: string|any): boolean {
text = text.replace(//gi, '년')
text = text.replace(/[^-]/gi, '')
const belittling = ["따까리", "장애년", "찐따년", "싸가지", "창년", "썅년", "버러지", "고아년", "고아년", "개간년", "종간나", "도구년", "걸래년", "썅년", "씹년",
"창녀", "머저리", "씹쓰래기", "씹쓰레기", "씹장생", "씹자식", "운지", "급식충", "틀딱충", "조센징", "매국노", "똥꼬충", "진지충", "듣보잡",
"한남충","정신병자","중생아","돌팔이","김치녀","폰팔이","틀딱년"]
"창녀", "머저리", "씹쓰래기", "씹쓰레기", "씹장생", "씹자식", "운지", "급식충", "틀딱충", "조센징", "매국노", "똥꼬충", "진지충", "듣보잡",
"한남충", "정신병자", "중생아", "돌팔이", "김치녀", "폰팔이", "틀딱년", "같은년", "개돼중", "쓰글년", "썩을년", "썩글년", "씹할", "거지새끼", "거지쉐뀌",
"거지쉑이", "거지쎄끼", "거지쒜리", "걸래가튼", "걸래넘", "걸래년", "걸래놈", "걸레가튼", "걸레년", "그지새끼", "그지새키", "그지색", "기집년", "까진년",
"깔보", "난잡년", "빡대가리", "더러운년", "돌아이", "또라이"]
for (const i of belittling) {
if (text.includes(i)) {
return true;
Expand Down
216 changes: 213 additions & 3 deletions src/checkForeign.ts

Large diffs are not rendered by default.

150 changes: 131 additions & 19 deletions src/checkGeneral.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export function general(text: string|any): boolean {
if(!text) throw new Error('Korcen: 확인할 텍스트를 입력해 주세요');
if(typeof text !== 'string') throw new Error('Korean: String 타입만 입력 가능합니다');
export function general(text: string | any): boolean {
if (!text) throw new Error('Korcen: 확인할 텍스트를 입력해 주세요');
if (typeof text !== 'string') throw new Error('Korean: String 타입만 입력 가능합니다');
const newtext = text.toLowerCase()

text = newtext.replace(/ /gi, '')
text = text.replace(/[^-]/gi, '')
text = text.replace(//gi, 'ㅗ')
Expand All @@ -20,6 +21,24 @@ export function general(text: string|any): boolean {
text = text.replace(//gi, 'ㅗ')
text = text.replace(//gi, 'ㅗ')
text = text.replace(//gi, 'ㅗ')
text = text.replace(/r/gi, 'ㅗ')
text = text.replace(/r/gi, 'ㅗ')
text = text.replace(/s/gi, 'ㅗ')
text = text.replace(/s/gi, 'ㅗ')
text = text.replace(/e/gi, 'ㅗ')
text = text.replace(/e/gi, 'ㅗ')
text = text.replace(/f/gi, 'ㅗ')
text = text.replace(/f/gi, 'ㅗ')
text = text.replace(/a/gi, 'ㅗ')
text = text.replace(/a/gi, 'ㅗ')
text = text.replace(/q/gi, 'ㅗ')
text = text.replace(/q/gi, 'ㅗ')
text = text.replace(/w/gi, 'ㅗ')
text = text.replace(/w/gi, 'ㅗ')
text = text.replace(/d/gi, 'ㅗ')
text = text.replace(/d/gi, 'ㅗ')
text = text.replace(/g/gi, 'ㅗ')
text = text.replace(/g/gi, 'ㅗ')
let fuckyou = ['ㅗ', '┻', '┴', '┹', '_ㅣ_', '_l_', '_/_', '⊥', '_ |\_', '_|\_', '_ㅣ\_', '_I_']
for (const i of fuckyou) {
if (text.includes(i)) {
Expand All @@ -44,7 +63,7 @@ export function general(text: string|any): boolean {
text = text.replace(/qkf/gi, '발')
text = text.replace(/qk/gi, '바')
text = text.replace(/[^-]/gi, '')
let fuck = ["시ㅂ", "시ㅏㄹ", "씨ㅂ", "씨ㅏㄹ", "ㅣ발", "ㅆ발", "ㅅ발", "ㅅㅂ", "ㅆㅂ", "ㅆ바", "ㅅ바", "시ㅂㅏ", "ㅅㅂㅏ", "시ㅏㄹ", "씨ㅏㄹ", "ㅅ불", "ㅆ불","ㅅ쁠", "ㅆ뿔", "씨8", "sipal","ㅅ ㅣ akwkksw바알","샤빨","쌰뺠","스벌","개존맛","TQ","tq","rotoRl","개좇돼","시방","tlqkf","w같은","신발련","뷰우웅신","좇","^^ㅣ벌","^^벌","씨벌","18아","tㅂ","siba","tq","qt","ㅆㅍ","Ribal","Libal"]
let fuck = ["18놈", "ㅅㅍ", "시ㅂ", "시ㅏㄹ", "씨ㅂ", "씨ㅏㄹ", "ㅣ발", "ㅆ발", "ㅅㅣㅂㅏ", "ㅆㅣ발", "ㅅ발", "ㅅㅂ", "ㅆㅂ", "ㅆ바", "tlbal", "ㅅ바", "시ㅂㅏ", "ㅅㅂㅏ", "시ㅏㄹ", "ㅅㅟ발", "씨ㅏㄹ", "ㅅ불", "ㅆ불", "ㅅ쁠", "ㅆ뿔", "tlba", "씨8", "tlbak", "tlpal", "tlbar", "sipal", "tlval", "시bal", "시bar", "시bak", "시pal", "시qk", "시val", "si바", "si발", "si불", "si빨", "si팔", "tl바", "tl발", "tl불", "tl빨", "tl팔", "10발련", "10발넘", "10발놈", "10발년", "ㅅ ㅣ akwkksw바알", "tlqkd", "샤빨", "18련", "쌰뺠", "si8", "스벌", "개존맛", "t발", "TQ", "tq", "rotoRl", "개좇돼", "18뇬", "시방", "tlqkf", "sibak", "w같은", "신발련", "뷰우웅신", "좇", "^^ㅣ벌", "^^벌", "씨벌", "18아", "tㅂ", "siba", "tq", "qt", "ㅆㅍ", "Ribal", "Libal"]
for (const i of fuck) {
if (text.includes(i)) {
return true;
Expand All @@ -62,16 +81,61 @@ export function general(text: string|any): boolean {
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
fuck = ["시발", "씨발", "시봘", "씨봘", "씨바", "시바", "샤발", "씌발", "씹발", "시벌", "시팔", "싯팔", "씨빨", "씨랼", "씨파", "띠발", "띡발", "띸발","싸발", "십발", "슈발","야발", "씨불", "씨랄", "쉬발", "쓰발", "쓔발", "쌰발", "쉬발", "쒸발", "씨팔", "씨밝", "씨밯", "쑤발", "치발", "샤발", "발씨", "리발", "씨볼","찌발", "씨비바라랄", "시바랄", "씨바라","슈벌","씹할","씹하다","십새","Sival","Sibal","시불","시부렝","시부랭"]
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
fuck = ["시발", "씨발", "시봘", "씨봘", "씨바", "시바", "샤발", "씌발", "씹발", "시벌", "시팔", "싯팔",
"씨빨", "씨랼", "씨파", "띠발", "띡발", "띸발", "싸발", "십발", "슈발", "야발", "씨불", "씨랄",
"쉬발", "쓰발", "쓔발", "쌰발", "쉬발", "쒸발", "씨팔", "씨밝", "씨밯", "쑤발", "치발", "샤발",
"발씨", "리발", "씨볼", "찌발", "씨비바라랄", "시바랄", "씨바라", "쒸팔", "쉬팔", "씨밮", "쒸밮", "시밮",
"씨삐라", "ㅆ삐라", "씨벌", "슈벌", "시불", "시부렝", "씨부렝", "시부랭", "씨부랭", "시부랭", "발놈시", "뛰발",
"뛰봘", "뜨발", "뜨벌", "띄발", "씨바알", "샤빨", "샤발", "스벌", "쓰벌", "신발련", "신발년", "신발놈", "띠발", "띠바랄"]
for (const i of fuck) {
if (text.includes(i)) {
return true;
}
}


text = newtext.replace(//gi, '놈')
text = text.replace(//gi, '놈')
text = text.replace(//gi, '놈')
text = text.replace(//gi, '놈')
const bullshit3 = ["18것", "18놈", "18럼", "18롬", "18새끼", "18세끼", "18세리", "18섹", "18쉑", "10쉑"]
for (const i of bullshit3) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
text = text.replace(//gi, 'ㄹ')
const bullshit1 = ["ㅈㄹ", "지ㄹ", "ㅈ랄", "ㅈ라"]
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, 'ㄹ')
text = text.replace(//gi, '')
const bullshit1 = ["ㅈㄹ", "지ㄹ", "ㅈ랄", "ㅈ라", "wlfkf", "g랄", "g럴", "g롤", "g뢀"]
for (const i of bullshit1) {
if (text.includes(i)) {
return true;
Expand All @@ -81,7 +145,7 @@ export function general(text: string|any): boolean {
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const bullshit2 = ["지랄", "찌랄", "지럴", "지롤", "랄지"]
const bullshit2 = ["지랄", "찌랄", "지럴", "지롤", "랄지", "쥐랄", "쮜랄", "지뢀", "띄랄"]
for (const i of bullshit2) {
if (text.includes(i)) {
return true;
Expand All @@ -97,7 +161,9 @@ export function general(text: string|any): boolean {
text = text.replace(//gi, '병')
text = text.replace(//gi, '신')
text = text.replace(//gi, '신')
const asshole = ["ㅄ", "ㅂㅅ", "병ㅅ", "ㅂ신", "ㅕㅇ신"]
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const asshole = ["ㅄ", "ㅂㅅ", "병ㅅ", "ㅂ신", "ㅕㅇ신", "ㅂㅇ신", "뷰신"]
for (const i of asshole) {
if (text.includes(i)) {
return true;
Expand All @@ -106,14 +172,15 @@ export function general(text: string|any): boolean {
text = newtext.replace(/[^-]/gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const asshole2 = ["병신", "병딱", "벼신"]
const asshole2 = ["병신", "병딱", "벼신", "붱신", "뼝신", "뿽신", "삥신", "병시니"]
for (const i of asshole2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
text = newtext.replace(/"[]/gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const motherfucker = ["염병", "엠병", "옘병", "염병", "얨병"]
Expand All @@ -131,7 +198,7 @@ export function general(text: string|any): boolean {
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
if (text.includes("꺼져")){
if (text.includes("꺼져")) {
return true;
}

Expand All @@ -142,39 +209,58 @@ export function general(text: string|any): boolean {
return true;
}
}
const shit2 = ["rotorl", "rotprl", "sib새"]
for (const i of shit2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/\^/gi, 'ㅅ')
text = text.replace(/H/gi, 'ㅐ')
text = text.replace(/10/gi, '새끼')
text = text.replace(/10/gi, '새끼')
text = text.replace(/10/gi, '새끼')
text = text.replace(/10/gi, '새끼')
text = text.replace(/10/gi, '새끼')
text = text.replace(/10/gi, '새끼')
text = text.replace(/[^-]/gi, '')
const sonofbitch = ["ㅅㄲ", "ㅅ끼", "ㅆ끼", "쎆", "쌖","쌔꺄","새꺄","씹색"]
const sonofbitch = ["ㅅㄲ", "ㅅ끼", "ㅆ끼", "쎆", "색ㄲㅣ", "ㅍ", "쌖", "쌔꺄", "새꺄", "씹색"]
for (const i of sonofbitch) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(//gi, '')
text = newtext.replace(/[^-]/gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const sonofbitch2 = ["새끼", "쉐리", "쌔끼", "썌끼", "쎼끼", "쌬끼", "샠끼","애쌔끼","세끼","이시키"]
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const sonofbitch2 = ["새끼", "쉐리", "쌔끼", "썌끼", "쎼끼", "쌬끼", "샠끼", "세끼", "샊", "쌖", "섺", "쎆", "십새", "새키", "씹색", "새까", "새꺄",
"새뀌", "새끠", "새캬", "색꺄", "색끼"]
for (const i of sonofbitch2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
const dick = ["ㅈ같", "ㅈ망", "ㅈ까", "ㅈ경"]
text = text.replace(//gi, '')
text = text.replace(//gi, '')
text = text.replace(//gi, '')
const dick = ["ㅈ같", "ㅈ망", "ㅈ까", "ㅈ경", "ㅈ가튼"]
for (const i of dick) {
if (text.includes(i)) {
return true;
}
}
text = newtext.replace(/[^-]/gi, '')
const dick2 = ["좆", "촟", "조까", "좈", "쫒", "졷", "좃"]
const dick2 = ["좆", "촟", "조까", "좈", "쫒", "졷", "좃", "좋같", "좃같", "좃물", "좃밥", "줫", "좋밥", "좋물", "좇"]
for (const i of dick2) {
if (text.includes(i)) {
return true;
Expand All @@ -190,16 +276,42 @@ export function general(text: string|any): boolean {
}

text = newtext.replace(/[^-]/gi, '')
const whatthefuck = ["뻑유", "뻐킹", "뻐큐"]
const whatthefuck = ["뻑유", "뻐킹", "뻐큐", "빡큐", "뿩큐", "뻑큐", "빡유"]
for (const i of whatthefuck) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
const sonofagun = ["개같", "개가튼", "개쉑", "개스키", "개세끼", "개색히", "개가뇬", "개새기", "개쌔기", "개쌔끼", "쌖", "쎆", "새긔", "개소리", "개년", "개소리","개드립","개샊","씹색","십새","Sib새"]
for (const i of sonofagun) {
const whatthefuck2 = ["닥쳐", "닭쳐", "닥치라", "아가리해"]
for (const i of whatthefuck2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/r[0-9]+/gi, '')
const whatthefuck3 = ["dog새"]
for (const i of whatthefuck3) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
text = text.replace(/ /gi, '')
text = text.replace(//gi, '')
const picking2 = ["ㅈㄴ", "ㅈ나", "존ㄴ", "존맛", "존나", "존내", "쫀나", "존네", "졸라"]
for (const i of picking2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(/[^-]/gi, '')
const picking3 = ["뒤져", "뒈져", "뒈진", "뒈질", "디져라", "디진다", "디질래"]
for (const i of picking3) {
if (text.includes(i)) {
return true;
}
Expand Down
Loading

0 comments on commit 79e3fbb

Please sign in to comment.