Profanity rates and reviews text, to see if its suitable. Enter a word and it will simply return a value of true or false, depending on whether or not the word is classed as profanity. Based off googles profanity check.
$ npm install --save profanity
var profanity = require("./profanity.js");
var chalk = require('chalk');
profanity("sex", function (response) {
if (response === "false") {
console.log(chalk.blue(response));
} else {
console.log(chalk.red(response));
}
});
| ---|--- Robert Gabriel |
MIT © Robert Gabriel