swearjaranz

0.4.2 • Public • Published

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.

Package Sidebar

Install

npm i swearjaranz

Weekly Downloads

3

Version

0.4.2

License

ISC

Unpacked Size

80 kB

Total Files

7

Last publish

Collaborators

  • mikeym007