blacklisted-words
v1.0.1
Published
Filter out a list of blacklisted words
Downloads
4
Maintainers
Readme
BlackListed Words
replace all the instances of your blacklisted words with asterisks
Example
$ npm install blacklisted-words --save
const {blacklistedWords} = require('blacklisted-words');
//ES2015 modules
import {blacklistedWords} from 'blacklisted-words';
const filtered = blacklistedWords(
'The shinigami Kenpachi Zaraki does not know the name of his Zanpakutō.',
['shinigami', 'Zanpakutō'],
'***'
);
console.log(filtered);
//The *** Kenpachi Zaraki does not know the name of his ***.