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 swearjaranzUsage
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"); // trueswearjar.censor(text)
Replaces profanity with asterisks.
var clean = swearjar.censor("f-bomb you"); // **** youAcknowledgements
swearjar-node is based on Swearjar (Ruby) and Swearjar PHP.