JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25728F
  • License ISC

Profanity detection and filtering library.

Package Exports

  • swearjaranz
  • swearjaranz/lib/swearjar.js

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 (swearjaranz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

swearjar-node

Profanity detection and filtering library. Taken from Raymond's version and extended for ANZ swear words etc

Installation

npm install --save swearjaranz

Usage

swearjar.profane(text)

Returns true if the given string contains profanity.

var swearjar = require('swearjar');
swearjar.profane("hello there"); // false
swearjar.profane("hello mother f-bomb"); // true

swearjar.censor(text)

Replaces profanity with asterisks.

var clean = swearjar.censor("f-bomb you"); // **** you

Acknowledgements

swearjar-node is based on Swearjar (Ruby) and Swearjar PHP.