0.0.2 • Published 9 years ago

simple-spam-filter v0.0.2

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

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