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

9 lines 325 B
export const parseString = (input) => { if (!input || input.length === 0) { return []; } input = input.replace(/'/g, " ' "); const words = input.match(/[\wÀ-ÿ]+|[.,!?;:]/g) || []; return words.map((word) => word.trim()).filter((word) => word.length > 0); }; //# sourceMappingURL=normalize.js.map