french-badwords-list
v1.0.7
Published
A highly consumable list of french bad (profanity) words (forked from badwords-list)
Downloads
30,219
Maintainers
Readme
French Bad Words List (french-badwords-list)
Synopsis
A highly consumable list of bad (profanity) french words based on the list found in Wiktionary.org and test with bad-words and leo-profanity
Inspired by badwords-list
Code Example
This bad (profanity) french words list can be used with bad-words or leo-profanity for example. (If you want to add your filter module don't hesitate to create a pull request on the readme).
var list = require('french-badwords-list'),
array = list.array,
object = list.object,
regex = list.regex;
Code Example with leo-profanity
french-badwords-list has been succesfully tested with leo-profanity
// Usage example with leo-profanity
var leoProfanity = require('leo-profanity');
var frenchBadwordsList = require('french-badwords-list');
// Only keep french badwords
leoProfanity.clearList();
leoProfanity.add(frenchBadwordsList.array);
// output: true
console.log(leoProfanity.check('Bordel de merde'));
// output: ****** de *****
console.log(leoProfanity.clean('Bordel de merde'));
// output: ****** de *****
console.log(leoProfanity.clean('B0rdel de m3rd3'));
Code Example with bad-words
french-badwords-list has been succesfully tested with bad-words
// Usage example with leo-profanity
var BadWords = require('bad-words');
const frenchBadwords = require('french-badwords-list');
// Only keep french badwords
var badwords = new BadWords({ placeHolder: 'x', emptyList: true});
badwords.addWords(...frenchBadwordsList.array);
// output: xxxxxx de xxxxx
console.log(badwords.clean('B0rdel de m3rd3'));
// output: true
console.log(badwords.isProfane('B0rdel de m3rd3'));
Motivation
This project was created to be used with badwords or leo-profanity nodes modules as a source for french bad words to filter.
Installation
npm install french-badwords-list
Tests
Requires
- Mocha
- Chai
- leo-profanity for integration testing
- bad-words for integration testing
- uglify-js to minify source files
Run
npm test
Release Notes
- v1.0.0 / Sep 07 2017: Initial publish
- v1.0.1 / Sep 13 2017: Updated french bad words list
- v1.0.2 / Sep 13 2017: Updated french bad words list
- v1.0.3 / Sep 18 2017:
- Updated french bad words list
- Tests rewritten with chai
- v1.0.4 / 0ct 02 2017: Add french bad words to the list
- v1.0.5 / 0ct 27 2017:
- Add new words to the list
- Use uglify-js to minify source files
- v1.0.6 / Aug 02 2022:
- Migrate to Github actions
- Update all dependencies
- v1.0.7 / May 25 2023: Security update
License
The MIT License (MIT)
Copyright (c) 2013 Maurice Butler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.