Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tecc/badwords.js
badwords.js is a NPM package designed to help you filter out profanity without ever having to write them!
https://github.com/tecc/badwords.js
Last synced: about 2 months ago
JSON representation
badwords.js is a NPM package designed to help you filter out profanity without ever having to write them!
- Host: GitHub
- URL: https://github.com/tecc/badwords.js
- Owner: tecc
- License: mit
- Created: 2019-06-16T20:54:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-04-27T05:57:27.000Z (over 2 years ago)
- Last Synced: 2024-11-29T15:26:49.104Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://tecc.github.io/badwords.js
- Size: 50.8 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# badwords.js
Bad words in multiple different forms, and some methods to help you get rid of them!
Version 0.1.9 (alpha)## Usage:
```javascript
const array = require('badwords.js/array'); // This will return an array of swear words. This is also the default.const object = require('badwords.js/object'); // This will return an object of swear words, which of all values are true. So if you're making if statements for single words, this is a better option than the array.
const json = require('badwords.js/json'); // This will return an array as well. Fair warning, this one is synchronous; feel free to use array instead.
const regexp = require('badwords.js/regexp'); // A regular expression. If you don't want to use the array.
// You can also reference different object types like this:
const badwordsjs = require('badwords.js');let array = badwordsjs.ARRAY;
let object = badwordsjs.OBJECT;
let json = badwordsjs.JSON;
let regexp = badwordsjs.REGEXP;
// If this didn't explain it clear enough, look through the source code!
// Want more object types? Suggest it!
```## Credits:
The `bad-words` and `badwords` NPM packages.