1.0.1 • Published 1 year ago

spam-check v1.0.1

Weekly downloads
192
License
MIT
Repository
github
Last release
1 year ago

spamCheck

Node.js CI Known Vulnerabilities

A simple node module for checking for spam in user inputs. This module comes with a full list of spam words!

Installation

npm install spam-check

Usage

var spamCheck = require('spam-check');
var options = {'string':'poop'};
spamCheck(options, function(err, results) {
  console.log("err:",err);
  console.log("results:",results);
});

You can also set a type flag for either full matches or partial matches. Below is an example for a partial match.

var spamCheck = require('spam-check');
var options = {'string':'wordspoopwords','type':'part'};
spamCheck(options, function(err, results) {
  console.log("err:",err);
  console.log("results:",results);
});

Results

Check the return for a err flag. If err is set to true, then the input was invalid. Otherwise it will be set to false. The above example will return something like...

{ spam: true }

Tests

You have to have mocha running. To install it run...

npm install mocha -g

Then you can run the tests by turning on the server and run...

mocha tests/

TODO

-Add other Validation rules

1.0.1

1 year ago

1.0.0

4 years ago

0.9.10

7 years ago

0.9.9

10 years ago

0.9.8

10 years ago

0.9.7

10 years ago

0.9.6

10 years ago

0.9.5

10 years ago