We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If I put many words together without spaces it doesn't filter them.
The text was updated successfully, but these errors were encountered:
Kind of defeats the purpose of this package...
Sorry, something went wrong.
This is a bummer! now noticed this happens... sigh
yup
I made a simple function that fixes it:
function cleanBadWords(s, filter = badWordsFilter) { s = s.replace(/\u200B|\u200C|\x00/g, ''); for (const swear of filter.list) { if (filter.exclude && filter.exclude.includes(swear.toLowerCase())) { continue; } s = s.replace( new RegExp( swear.replace(/([\.\*\-\\\/\?\+\{\}\[\]\|\(\)])/g, '\\$1'), 'gi' ), '*'.repeat(swear.length) ); } return s; } ``
No branches or pull requests
If I put many words together without spaces it doesn't filter them.
The text was updated successfully, but these errors were encountered: