web-mech / badwords

A javascript filter for badwords
MIT License
618 stars 325 forks source link

adding hasBadWord as a boolean function #150

Open hoseinmirian opened 2 years ago

hoseinmirian commented 2 years ago

I appreciate if you guide me if there is any way to only give back a true false if the sentence has a bad word? if not please create a function like hasBadWords() which returns either true or false.

mudkipdev commented 2 years ago

You can use the isProfane function to my knowledge. https://github.com/web-mech/badwords/blob/master/lib/badwords.js#L32