Complete swear filter package which support most languages and more than 10000 words .
npm install swearify --save
const filter = require('swearify');
const result = filter.findAndFilter (
'Lorem ipsum dolor fUck amet, consectetur xxx elit, sed do жопа tempor incididunt fuck ut sex et
dolore magna aliqua, lorem دیوس dolor sit amet, consectetur بیناموس elit, sed do eiusmod tempor incididunt
ut b*tch et dolore ковровщик aliqua 🖕', // your sentence to filter
'▩', // placeholder
['en', 'fa', 'ru'], // filter in which languages
['sex'], // allowed swears
[], // add your own words
);
console.log(result);
{
found: true,
selected_languages: [ 'en', 'fa', 'ru' ],
bad_words: [ 'ковровщик', 'بیناموس', 'b*tch', 'fuck', 'دیوس', 'жопа', 'sex', 'xxx', 'xx', '🖕'],
filtered_sentense: 'Lorem ipsum dolor ▩▩▩▩ amet, consectetur ▩▩▩ elit, sed do ▩▩▩▩ tempor incididunt ▩▩▩▩ ut sex et dolore magna aliqua, lorem ▩▩▩▩ dolor sit amet, consectetur ▩▩▩▩▩▩▩ elit, sed do eiusmod tempor incididunt ut b*▩▩▩▩▩ et dolore ▩▩▩▩▩▩▩▩▩ aliqua ▩▩',
allowed_words: [ 'sex' ]
}