New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

coparenter-retext-profanities

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coparenter-retext-profanities

Based on the rexet-profanities. Modified to use our set of profanities. Check for profane and vulgar wording with retext

  • 4.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

retext-profanities Build Status Coverage Status

Check for profane and vulgar wording with retext. Uses [coparenter-cuss][] for sureness.

Installation

npm:

npm install retext-profanities

Usage

Say we have the following file, example.txt:

He’s pretty set on beating your butt for sheriff.

And our script, example.js, looks like this:

var vfile = require('to-vfile');
var report = require('vfile-reporter');
var unified = require('unified');
var english = require('retext-english');
var stringify = require('retext-stringify');
var profanities = require('retext-profanities');

unified()
  .use(english)
  .use(profanities)
  .use(stringify)
  .process(vfile.readSync('example.txt'), function (err, file) {
    console.error(report(err || file));
  });

Now, running node example yields:

example.txt
  1:33-1:37  warning  Be careful with “butt”, it’s profane in some cases  butt  retext-profanities

⚠ 1 warning

API

retext().use(profanities[, options])

Check for profanities.

options.ignore

Array.<string> — phrases not to warn about.

Rules

See rules.md for a list of rules.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 16 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc