Profam
All in One Profanity and Spam Tool, supporting multiple languages and modes.
Thanks to:
Tools Available
Tool | Use | Default Status |
---|
Profanity | Used to censor words using the selected modes. | Enabled |
Spam | Uses an algorithm to stop repeating characters. | Disabled |
How to
Warning : Examples may contain offensive text
Quick Start
import profam from 'profam';
let profam = new profam();
profam.profanity.setLocalesDir('/locales/[locale].json');
profam.profanity.setLocales('en');
profam.profanity.setModes('funny');
profam.process('Go to hell!');
profam.profanity.setLocales('customLanguage', true);
profam.profanity.setLocales('customLanguage', true, true);
profam.profanity.addWords('customLanguage', ['badword']);
In-Depth all methods
Profanity Tool
Method | Parameters | Use | Default |
---|
profanity.enable = | Boolean | Enable or disable profanity | TRUE |
profanity.setLocalesDir(<string>) | String | Replaces [locale] with the language you want to download. Ex: yoursite.com/locales/[locale].js | null |
profanity.setLocales(<string/array>, <true/false>, <true/false> | - Locales(s)
- is custom
- keep existing
| Add the languages you wonna look for bad-words | - Empty
- false
- false
|
profanity.addWords(<string>, <array>, <boolean>) | - Locale
- Words
- Add
| Add new words in selected locale. | |
profanity.removeWords(<string>, <array>) | - Locale
- Words
| Remove words from locale. | |
profanity.setModes(<string/array>) | - Mode(s)
| Set Modes | asterisks-obscure |
profanity.getLocales() | | Get Locales | |
profanity.getLocalesEnabled() | | Get Locales Enabled | |
profanity.getModes() | | Get Modes | |
profanity.getModesEnabled() | | Get Modes Enabled | |
Spam Tool
Method | Parameters | Use | Default |
---|
spam.enable | Boolean | Enable or disable Spam | FALSE |
Profam
Method | Parameters | Use | Default |
---|
.proceed(<string>) | String | Return censored string | |