Skip to content

d-oliveros/profanity-censor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

profanity-censor

A tiny node.js module for censoring curse and bad words. It hosts a default dictionary, with the option to use your own.

Installation

npm install --save profanity-censor

API

profanity.filter(string)

Replaces the bad words in the string with asterisks. Returns the censored string.

var profanity = require('profanity-censor');

console.log(profanity.filter('Bad words here.'));

profanity.use(dictionary)

Replaces the dictionary with a provided dictionary. The dictionary should be an array of strings.

var profanity = require('profanity-censor');
var dictionary = ['popcorn', 'bad words'];
profanity.use(dictionary);

About

Profanity filter for NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •