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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dunktags

v0.1.1

Published

Generate hashtags from bad tweet IDs for dunking on them without boosting engagement

Downloads

2

Readme

Dunktags

Support me on Patreon
Linux Build Status npm version

Generate hashtags from the URLs of bad tweets, to coordinate dunks on the original tweet without boosting said tweet's status in the Twitter Algorithm.

Just say No to bad opinions.

The Problem

Every once in a while, some jerk tweets something extremely stupid, immoral, incorrect, or otherwise tempting to dunk on.

For example:

A bad tweet by a dumb organization

Whenever something like this happens, a lot of people give into the temptation to dunk on these clowns.

Unfortunately, this means that the bad tweet gets a lot of Replies and Quote Tweets. This amplifies their bad opinion to a wider audience and tells the Twitter Algorithm that this tweet is hotcakes, and that they should show it to more unrelated people in order to further "the conversation".

Naturally, shitty people are clued into this fact, and will act accordingly.

Milking outrage for more engagement

Why do well-meaning people keep falling for this?

We can do beter.

How Dunktags Help

Rather than totally refrain from dunking on someone for being bigoted or stupid, let's just be smarter about how we dunk.

Here's what you do:

  1. Take a screenshot of the offending tweet. (See examples above.)
  2. Archive the original tweet.
  3. Use this library to generate a dunktag from the original tweet URL.
  4. When you choose to dunk on this clown, instead of replying or quote-tweeting them, simply post your screenshot (and archive URLs) with the hashtag generated by the dunktag() function.

Now you can dunk away without accidentally amplifying hate speech.

Technical Documentation

Installing this Library

From npm:

npm install dunktags

If you want to use dunktags globally, make sure you pass the -g flag.

npm install -g dunktags

Using this Library after Installing

Command Line

First, make sure you run tsc to compile from TypeScript to JavaScript.

Next, launch Node.js like so:

node

Next, you should have a > prompt. Type the following then press enter:

const { dunktag } = require('dunktags');

Now you can use the dunktag() function at your leisure.

> dunktag('https://twitter.com/SoatokDhole/status/1103407038468681741');
'#dunk_6ea7143150'
> 

TypeScript Applications

import { dunktag } from "dunktags";

console.log(dunktag('https://twitter.com/SoatokDhole/status/1481105268138258437'));
// Outputs #dunk_3e45fd4499

JavaScript Applications

const { dunktag } = require('dunktags');
console.log(dunktag('https://twitter.com/SoatokDhole/status/1481105268138258437'));
// Outputs #dunk_3e45fd4499

Algorithm Description

Dunktags use BLAKE2b under the hood, with an output length of 5 bytes (10 hex characters), and a constant BLAKE2b key of 0x572a7ff65e3969e1d1f43911cc07ff82463e5ae113f248dc9035d5e21aabad85 (for domain separation). The key is the BLAKE2b hash of the string, Soatok Dreamseeker's dunktag function.

First, the Twitter user's tweet ID is extracted from the tweet. (Function: getTweetId())

Next, the BLAKE2b hash of this tweet ID is calculated, using the above parameters.

This hex-encoded hash is returned with a constant prefix (#dunk_).