0.2.2 • Published 1 year ago

censoring.js v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Censoring.js

About

This package is able to filter words of a string and avoid common bypass methods like using different fonts or symboles between the words.

Installation

npm i censoring.js

Usage

const { censor } = require("censoring.js")

const string = "I dont like cats. C4ts are 𝓵𝓪𝔃𝔂 and attacking me all the time! I h-a.te them.."
const array = ["cats", "lazy", "hate"]
const replacement = "*"

const censored = censor(string, array, replacement)
console.log(censored) // I dont like **** **** are **** and attacking me all the time! I **** them..

Check

const { censorable } = require("censoring.js")

const string = "I dont like cats.."
const array = ["cats"]

const check = censorable(string, array)
console.log(censorable) // true