JSPM

censor-swear

1.0.4
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q38524F
    • License ISC

    censor any bad words that you need to

    Package Exports

    • censor-swear

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (censor-swear) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Need to make sure no one puts naughty words in your text? Need to keep your comments section kid-friendly? filter out whatever you need to by passing in an array, and watch those words be cleaned right up. censor takes two arguments. First, is an arr of words that you will check for. the second is the string that you wish to pass through and censor.

    ex: var censor = require(PATH)

    censor.censorBadWords(['array', 'of', 'bad', 'words'], 'string of words to see what is bad')

    returns: 'string o* w**** to see what is b**'