TabooTyper Documentation

Filter and replace banned words in JavaScript effortlessly. Enhance your content moderation, chat filtering, and profanity detection with TabooTyper.

Installation

TabooTyper can be included in your project via either CDN or npm.

Using CDN

Add the following script to your HTML:

<script src="https://cdn.jsdelivr.net/gh/sumeetghimire/TabooTyper/index.js"></script>

Using npm

To install TabooTyper via npm, run the following command in your project directory:

npm install taboo-typer

Then, import it into your JavaScript file:

import TabooTyper from 'taboo-typer';

Usage

To initialize TabooTyper, create a new instance and configure it according to your needs:

<script>
    new TabooTyper({
        selector: "textarea, input",
        bannedWords: { "dumb": "not smart", "stupid": "silly", "hate": "dislike", "bad": "unpleasant" },
        masked: false,
        maskCharacter: "#",
        caseSensitive: false,
        trackFrequency: true,
        highlight: true,
        suggestions: true,
        contextSensitive: true,
        warningStyle: "",
        popupBackgroundColor: 'red',
        popupTextColor: 'white'
    });
</script>

Settings Explanation

Additional Features

TabooTyper offers various features to enhance your content moderation experience: