Randomly replaces text with profanity.
Written by Mr. Papercut (Mischa Rodermond) (website).
Install with npm:
npm install profanity
"use strict";
var profanity = require('profanity');
var str = "You are a very kind person and your mother looks lovely.";
console.log(profanity.addProfanity(str));
{
"enabled": boolean, // turns profanity on/off
"level": int(1-10) // Profanity level. 1 is almost no profanity, 10 is full sergeant Hartman
}
The wordlist can be found and edited in ./lib/wordlist.json