devil-cyber / badwords

The best way to handle badwords

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

badwords

Javascript filter for badwords. Work in browser & node. Open for contribution. You can text me on discord Kawacrepe#8492 for any questions.

Installation

npm i @kawacrepe/badwords

Testing

npm test

Usage

const Filter = require('@kawacrepe/badwords');
const filter = new Filter();

console.log(filter.clean("Don't be an asshole"));
// 'Don't be an ******
const Filter = require('@kawacrepe/badwords');
const filter = new Filter();

console.log(filter.doesContainBadwords("Don't be an asshole"));
// [true, 'asshole']
const Filter = require('@kawacrepe/badwords');
const filter = new Filter({list: ['test', 'github'], placeHolder: 'x'});

console.log(filter.clean('Github is really helpfull, asshole'));
// xxxxxx is really helpfull, asshole

About

The best way to handle badwords

License:MIT License


Languages

Language:JavaScript 100.0%