Skip to content

Commit

Permalink
Update checkBelittle.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanat05 authored Jun 12, 2022
1 parent 0ed7355 commit 91a42ae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/checkBelittle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ 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, '련')
text = text.replace(//gi, '련')
const belittling2 = ["10련"]
for (const i of belittling2) {
if (text.includes(i)) {
return true;
}
}

text = newtext.replace(//gi, '년')
text = text.replace(//gi, '년')
text = text.replace(//gi, '년')
Expand Down

0 comments on commit 91a42ae

Please sign in to comment.