1.0.3 • Published 10 months ago

custom-profanity-filter v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Profanity Filter

version downloads

NPM package available here.

Installation

npm install custom-profanity-filter

Usage

You will have to provide the custom list of bad words for the filter. Ensure that the custom list of bad words you want to filter is in an array format. customBadWords = "custom", "list", "here";

The filter is case insensitive and will pick up words part of a larger string.

const profanityFilter = require('custom-profanity-filter');

let customBadWords = ["custom1", "custom2", "custom3"];
let textToFilter = "This is some text with custom1 and CUSTOM2 and another custom1word without space.";

let filteredText = profanityFilter(textToFilter, customBadWords);
console.log(filteredText);  // Outputs the filtered text
1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago