sensy-words-filter

Package to filter out a list of sensitive words

Usage no npm install needed!

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

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