npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wormbait

v1.0.0

Published

Wormy is a simple clickbait detector built on top of 1040 Inc.com articles

Downloads

7

Readme

Wormbait

Wormbait is a simple knn-like algo to identify clickbait titles.

What's so special about it ? Wormbait is trained with 1040 Inc.com titles, because besides having great articles, they have some of the most clickbaity titles out there.

Why is it called wormbait ?

    1. Click ==> worms
    1. I built [fishingrod])(http://npmjs.org/package/fishingrod) so obviously you need bait and worms

CLI

Wormbait is bunbled with a very small CLI tool

Installation

npm install -g wormbait

Usage

$ wormbait "this is not clickbait" "deep fried chicken" Learning from 1040 sentences Finished Learning! YES: "this is not clickbait" is PROBABLY clickbait with a score of 0.2942307692307693 NO: "deep fried chicken" is PROBABLY NOT clickbait with a score of 0.013565

API

Wormbait is a class you can instanciate and provides some utility methods

Installation

npm install wormbait

tl;dr

const Wormbait = require('wormbait');
let inc = new Wormbait();

inc.learn();
let is_bait = inc.predict('This is some title of some article');

if(is_bait){
	console.log('CLICKBAIT!!!')
}

Methods

getDataSet()

Returns the data set bundled with wormbait, with over 1000 Inc.com article titles.

DataSet is simply an array filled with strings.

learn(data)

data: Array with strings

Learns from the provided data. Simple example:

let data = w.getDataSet().splice(0, 800);
w.learn(data);

predict(title)

title: String

Returns boolean predicting if clickbait or not depending on data learned from.

test(data)

data: Array with LearnObject

LearnObject:

{
	title: 'This is some title to test against',
	clickbait: true
}

Tests the learning algorithm, and returns predictions and statistics

{
	predictions: [{
		score: 0.005,
		val: true,
		correct: false
	}],
	ratio: 0.8,
	correct: 80,
	wrong: 20
}

__predict(title)

Returns the associated score (0 to 1)

setThreshold(t)

Sets the minimum threshold to identify title as clickbait. Default is 0.2