@modos.m98/persian-swear-words
v2.3.1
Published
filter persian swear words
Downloads
16
Readme
Link on npm : https://www.npmjs.com/package/@modos.m98/persian-swear-words
Install
npm i @modos.m98/persian-swear-words
Import
const swear = require("@modos.m98/persian-swear-words")
Usage
Gist
🔸 Check a string contains bad word
let text = 'علی خر است'
swear.hasSwear(text) /// returns true
🔸 Check a word is bad or not
let text = 'کسکش'
swear.is_bad(text) /// returns true
let text2 = 'سلام'
swear.is_bad(text2) /// returns false
🔸 Add word to list
let text = 'تخم'
swear.add_word(text)
🔸 Remove word from list
let text = 'تخم'
swear.remove_word(text)