UNPKG

profanity-checker-fr

Version:

French Profanity Filter is a lightweight and easy-to-use Node.js module to detect and filter offensive words (profanity, insults) in French sentences. Ideal for chat applications, comment moderation, and any service that requires clean user-generated cont

26 lines 982 B
import { ProfanityConfig } from './profanityConfig.js'; export declare class ProfanityChecker extends ProfanityConfig { /** * Check if the sentence contains any bad words. * @param sentence - The sentence to check. * @returns {boolean} - True if bad words are found, otherwise false. */ static hasBadWords(sentence: string): boolean; /** * Censor bad words in the sentence by replacing them with asterisks. * @param sentence - The sentence to censor. * @returns {string} - The censored sentence. */ static censoredSentence(sentence: string): string; /** * List all bad words currently in the set. * @returns {string[]} - An array of bad words. */ static listBadWords(): string[]; /** * List all whitelisted words currently in the set. * @returns {string[]} - An array of whitelisted words. */ static listWhiteListWords(): string[]; } //# sourceMappingURL=profanityChecker.d.ts.map