JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30489
  • Score
    100M100P100Q169175F
  • License MIT

Check for profane and vulgar wording with retext

Package Exports

  • retext-profanities

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (retext-profanities) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

retext-profanities Build Status Coverage Status

Check for profane and vulgar wording with retext.

Installation

npm:

npm install retext-profanities

retext-profanities is also available for duo, and as an AMD, CommonJS, and globals module, uncompressed and compressed.

Usage

var retext = require('retext');
var profanities = require('retext-profanities');
var report = require('vfile-reporter');

retext()
    .use(profanities)
    .process([
        'He’s pretty set on beating your butt for sheriff.'
    ].join('\n'), function (err, file) {
        console.log(report(file));
    });

Yields:

<stdin>
  1:33-1:37: Don’t use “butt”, it’s profane

⚠ 5 warnings

API

retext.use(profanities[, options])

Check for profane and vulgar wording.

Parameters

  • profanities — This plug-in;

  • options (Object?, optional):

    • ignore (Array.<string>) — List of phrases to not warn about.

License

MIT © Titus Wormer