https://github.com/iamnotacoder-djs/automod-filter
A javascript filter for badwords.
https://github.com/iamnotacoder-djs/automod-filter
bad word words
Last synced: 8 months ago
JSON representation
A javascript filter for badwords.
- Host: GitHub
- URL: https://github.com/iamnotacoder-djs/automod-filter
- Owner: iamnotacoder-djs
- License: apache-2.0
- Created: 2022-09-22T07:23:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-04T13:33:48.000Z (over 3 years ago)
- Last Synced: 2024-10-16T03:33:11.457Z (over 1 year ago)
- Topics: bad, word, words
- Language: TypeScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# automod-filter
A javascript filter for badwords
[](https://npmjs.org/package/automod-filter)
## Installation
npm install automod-filter --save
## Usage
```js
const { Automod } = require('automod-filter');
console.log(Automod.filter("What the fuck is going on here? Whore" })) // What the ████ is going on here? █████
```
### Options
```js
const { Automod, Lang, Method } = require('./lib/index.js');
console.log(Automod.filter("d@mn а я fuck не понял 6ля что вы shit делаете whore в холодильнике cуk@", { langs: [ Lang.ENGLISH ], method: Method.CLASSIC } ));
// {
// input: 'd@mn а я fuck не понял 6ля что вы shit делаете whore в холодильнике cуk@',
// output: 'd@mn а я ████ не понял 6ля что вы ████ делаете █████ в холодильнике cуk@'
// matches: [ 'fuck', 'Whore' ]
// }
console.log(Automod.filter("d@mn а я fuck не понял 6ля что вы shit делаете whore в холодильнике cуk@", { langs: [ Lang.ENGLISH, Lang.RUSSIAN ], method: Method.STRICT, replacer: "*" }));
// {
// input: 'd@mn а я fuck не понял 6ля что вы shit делаете whore в холодильнике cуk@',
// output: '**** я **** не понял *** что вы **** делаете ***** в холодильнике ****',
// matches: [ 'd@mn', 'fuck', '6ля', 'shit', 'whore', 'cуk@' ]
// }
```
### TODO
- Regex search
- Fill English replacers
- URL parser
### Community
- Found a bug: [submit an issue.](https://github.com/iamnotacoder-djs/automod-filter/issues/new)
- Discussion and help about automod-filter: [🇷🇺 Discord Server](https://discord.gg/YeqrTtpmaH)