You can use this package to censor a specified string using special characters or grawlix (%$#!@). This could be used to censor cursewords.
This package has 3 functions, all 3 used to censor/block out certain words.
The first function can receive a string and replaces the vowels with an asterisk, or another specified character.
censor.vowel('butt')
Would output b*tt, and
censor.vowel('butt', #)
would output b#tt.
The second function replaces all words between the first and last char of a word, with specified characters or asterixes just like the first one.
censor.inner('butt', &)
would ouput b&&t.
The last function replaces all characters of a string with grawlix.
censor.grawlix('butt')
would output @#$%.