UNPKG

glin-profanity

Version:

Glin-Profanity is a lightweight and efficient npm package designed to detect and filter profane language in text inputs across multiple languages. Whether you’re building a chat application, a comment section, or any platform where user-generated content

21 lines (20 loc) 691 B
import { CheckProfanityResult, Language } from '../types/types'; interface ProfanityCheckerConfig { languages?: Language[]; allLanguages?: boolean; caseSensitive?: boolean; wordBoundaries?: boolean; customWords?: string[]; replaceWith?: string; severityLevels?: boolean; allowObfuscatedMatch?: boolean; fuzzyToleranceLevel?: number; customActions?: (result: CheckProfanityResult) => void; } export declare const useProfanityChecker: (config?: ProfanityCheckerConfig) => { result: CheckProfanityResult; checkText: (text: string) => void; checkTextAsync: (text: string) => Promise<CheckProfanityResult>; reset: () => void; }; export {};