@kawacrepe/badwords
v1.1.0
Published
Blazing fast javascript badwords filter
Downloads
4
Readme
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