npm install retext-profanities
Say we have the following file,
He’s pretty set on beating your butt for sheriff.
…and our script,
example.js, looks like this:
var vfile =var report =var unified =var english =var stringify =var profanities =
node example yields:
example.txt1:33-1:37 warning Be careful with “butt”, it’s profane in some cases butt retext-profanities⚠ 1 warning
Phrases not to warn about (
Minimum sureness to warn about, see
rules.md for a list of rules.
Note that Latin-script Arabic (
retext-profanities/fr), Spanish (
retext-profanities/it), and Brazilian Portuguese (
are also supported.
rules.md for a list of rules and how rules work.
Each message is emitted as a
file, with the
Name of this plugin (
Cuss sureness (
Profane phrase (
Empty array to signal that
actual should be removed or changed (
retext-equality— Check possible insensitive, inconsiderate language
retext-passive— Check passive voice
retext-simplify— Check phrases for simpler alternatives
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.