blacklisted-words

Filter out a list of blacklisted words

Usage no npm install needed!

<script type="module">
  import blacklistedWords from 'https://cdn.skypack.dev/blacklisted-words';
</script>

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 ***.