censor-swear
v1.0.4
Published
censor any bad words that you need to
Downloads
5
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**'