Nefarious Planetary Meddling

    profanity-matcher

    1.0.1 • Public • Published

    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

    Install

    npm i profanity-matcher

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • quylaa