sensy-words-filter
v1.0.1
Published
Package to filter out a list of sensitive words
Downloads
7
Maintainers
Readme
sensy-words
Setup
$ npm install sensy-words-filter --save
Usage
const {sensyWords} = require('sensy-words-filter')
// ES2015 modules
import {sensyWords} from 'sensy-words-filter'
Replaces blacklisted words with asterisks
const words =
sensyWords(
'sensy-words, a package for filtering out a list of sensitive words',
['filtering', 'sensitive']
)
console.log(words)
// sensy-words, a package for **** out a list of **** words
Replaces multiple instances of blacklisted words
const words =
sensyWords(
'sensy-words, a sensitive package for filtering out a list of sensitive words',
['filtering', 'sensitive']
)
console.log(words)
// sensy-words, a **** package for **** out a list of **** words