simple-spam-filter

0.0.2 • Public • Published

simple-spam-filter

Simple spam filter to analyze tweets.

Installation

$ npm install simple-spam-filter

Usage

var SimpleSpamFilter = require('simple-spam-filter')

// These parameters are all optional
var opts = {
	minWords: 5,
	maxPercentCaps: 30,
	maxNumSwearWords: 2
}

var filter = new SimpleSpamFilter(opts)

var spammyTweet = 'YO MAN WATUPPPPP SONN'
filter.isSpam(spammyTweet) // true

var nonSpammyTweet = 'Why hello good sir, how are you doing?'
filter.isSpam(nonSpammyTweet) // false

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i simple-spam-filter

Weekly Downloads

5

Version

0.0.2

License

MIT

Last publish

Collaborators

  • justindeguzman