1.1.0 • Published 4 years ago

@kawacrepe/badwords v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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