Lietsaki / whoolso-word-filter

A flexible, smart word filter to prevent profanity or whatever whatever suits your taste.
1 stars 0 forks source link

Add censor method #1

Open epexa opened 3 years ago

epexa commented 3 years ago

Implement method to replace stringToCheck to censor and return the finished string.

Like tihs:

configObj.stringToCheck = `They are something else, uneeduuuucaa@t333ed republicans`;
console.log(censorWords(configObj)); //  'They are something else, ******************* ***********' 
Lietsaki commented 3 years ago

Hi @epexa, it's understandable wanting to return the censored string that way. When I built this repo the feature I was going for didn't involve censoring the string, only detecting the number of forbidden words, so this feature was not something I thought about.

However, you can submit a PR implementing this on your own (as I'm busy with other projects right now) and I'll gladly review and merge it. Thank you for checking out the filter by the way!