easy-profanity-filter
v1.0.0
Published
front-end profanity filtering script generator
Downloads
46
Readme
Easy Profanity Filter
Instructions
- install:
npm install easy-profanity-filter --save
- import:
import ProfanityFilter from 'easy-profanity-filter
- use:
let filter = new ProfanityFilter();
API
ProfanityFilter::detect(string):
filter.detect('this sentence does not contain expletives')
=> false
;
ProfanityFilter::censor(string):
filter.addBlackListedWords('expletive')
filter.censor('this sentence contains an expletive')
=> this sentence contains an *****