Transform normal English text in various funny ways. (Demo)
Table of Contents
npm install talk-like-a
This package exports a number of functions, each of which take a single string as their input, and return a transformed version of the same string as their output. All of these functions are deterministic; for the same input they will always produce the same output.
Talk like a Usenet newbie.
const b1ff = ;console;// HELO!!! HOW ARE U 2DAY???!
CENSORED like a CENSORED.
const censor = ;console;// Hello, CENSOREDhead! How the CENSORED are you today?
Talk like the Swedish Chef.
const chef = ;console;// Hellu! Hoo ere-a yuoo tudey?// Bork Bork Bork!
Talk in a bad Cockney accent.
const cockney = ;console;// 'Ullo! 'ow are y'today, roit?'
Talk like a k3wl hacker.
const eleet = ;console;// H3ll0! H0w 4r3 y0u t0d4y?
Talk like Elmer Fudd.
const fudd = ;console;// Hewwo! How awe you today?
Talk in a bad hillbilly accent.
const jethro = ;console;// Howdy. Ye DAWGies!!! How is y'all today?
Runs text through a random selection of the rest of the filters, to make really weird output.
const jibberish = ;console;// %%%faanj ''hap ooja ^oo, iiin7!, :w >|)aqpaaj ooj ooj f7oosaj aaz z! Struth! oo7aq// i>|joq >|joq >|joq// `joojjjoo e-oraaf e aaz zaayf// ---`e-ajnwaj pjn^ aaz f)afqoos aaz u, cor blimey! fn + '7daj z7aaor e-asaaz wnjj qaaaj)sqooswuoo2\n\n
Talk in a bad Cockney accent, featuring (dubious) rhyming slang for a lot of computer terminology.
const ken = ;console;// Hello! Struth! How are yer today?
Talk like Kenny on South Park.
const kenny = ;console;// Mfpmpppmfpmfppf! Mfpppffpp mmmpffmpp ffmppffmf fmpppfmpmmmmffm?
Talk in a bad German accent.
const klaus = ;console;// Vhat are you up to today? I hafe nodingkt goingkt on.
Talk like an obnoxious catperson.
const ky00te = ;console;// Whattarre ya up ta today? Y have na'hyng goyng on.
Talk like a mid-2000s image macro.
const LOLCAT = ;console;// WHAT ARE YOU UP 2 TODAI? I HAS NOTHIN GOIN ON.
Talk like a wiped out text in nethack.
const nethackify = ;console;// Hello! Hcw ?e ycu tocay?'
Talk like it's 1984.
const newspeak = ;console;// Hello citizen! It is unsunny today? It's plusunlight outside.// Hail Big Brother!
Talk in a bad New York accent.
const nyc = ;console;// Hello! Okay? Howahrya today, or what?
Talk like a pirate.
const pirate = ;console;// What be ye up t' today? I have nothin' goin' on, avast.
Talk like a busy open-source software developer.
const rasterman = ;console;// hello! how aer u today?
Talk in a bad Scottish accent.
const scottish = ;console;// What be ye up ta today? I haf nuthin' goin' on.
Scramble the "inner" letters of each word in the input into a random order. The resulting text is still strangely readable.
const scramble = ;console;// Waht are you up to toady? I hvae nonihtg gonig on
Talk like a spambot!
const spammer = ;console;// BELOW IS THE RESULT OF YOUR FEEDBACK FORM: HELLO! HOW ARE YOU TODAY?// This is a 1 time offer.// ---// To unsubscribe from these mails reply and put in the subject the word REMOVE.////
const studly = ;console;// WhAt aRe yOu uP to todAy? i haVe nOthiNg gOing on.
Replace ASCII with nearly-identical Unicode characters.
const uniencode = ;console;// Неⅼⅼօ! Нօw аrе уօυ tօⅾау?
Flips text upside down (using only ASCII characters, so you kind of have to squint to see it).
const upsidedown = ;console;// %hepof noh aje moy io77ay
which is a collection of command-line jokey text transformation scripts. For
example, the "pirate" command transforms text to sound like a pirate, and the
"eleet" command transforms text so that it looks like it was written
in classic 90s 1337-speak.
The text transformation algorithms used here are based on code cloned from
this Git repo:
The filters were written by several different authors, and collected by
Joey Hess (who also wrote several of them!).
/originals directory for copyright and license information on each of
So, for testing purposes, I wound up writing modified versions of most of the original scripts, replacing the random number generation with a simpler pseudo-random number generator easily replicable in multiple programming languages. I also cleaned up some bugs and made other changes to make their behavior more reproducible.
The code for the modified versions of the debian CLI scripts, is in the Git
/original directory. These have been used to generate sample texts,
which are stored in the
/tests directory and can be used to test whether the
JS scripts produce identical output by running
npm run test:original. To
update the generated sample texts, you will need to compile the CLI scripts
from source code. Running
npm run compile-and-make-test-data will accomplish
this, but you will first have to install various CLI dependencies. See
original/README for more information.
npm run test will run a different set of tests that use Jest snapshots.