A Node.js profanity filter that extends the original badwords library by allowing the first and/or last letter of filtered words to be displayed. Current stable version is 3.0.4 (2020). No recent updates. Key differentiators: placeholder override, regex customization, add/remove words, empty list instantiation, and firstLetter/lastLetter display options. Requires Node >=12. Compared to alternatives like bad-words (the parent project), bad-words-plus adds these display options but may lag in maintenance.
npm install bad-words-plusNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic instantiation with firstLetter option, custom words, and isProfane check.
Use new Filter({ emptyList: true, list: ['bad', 'word'] })Ensure replaceRegex includes all characters you want to replace, e.g., /[A-Za-z0-9가-힣_]/g
Consider migrating to actively maintained alternatives like 'bad-words' or 'leo-profanity'.
Use new Filter({ list: ['word1', 'word2'] })Run 'npm install bad-words-plus'
Use 'import Filter from 'bad-words-plus'' or 'const Filter = require('bad-words-plus')'Ensure filter is created: const filter = new Filter({...})No dependency data recorded yet.