1.0.1 • Published 8 years ago

profanity-matcher v1.0.1

Weekly downloads
2
License
ISC
Repository
-
Last release
8 years ago

Profanity Matcher

This is a very small, and simple profanity matcher that scans for 900+ words and/or strings. This is not intended to be used as a robust profanity filter, but as a warning mechanism that a string of text might need to be approved or reviewed by a human before it's published.

Extended from sloankev's profanity-scanner. This version returns an array of matched words, or an empty array if none were found. I also combined the existing word list with the google banned word list.

Example Usage

var pf = new Profanity_Scanner()
pf.scan('hello there!') // returns []
pf.scan('stfu.') // returns ['stfu']

pf.add_word('noobie') // returns true if added
pf.remove_word('noobie') // returns true if removed