Nyanifier

Text in, cat nonsense out. The same text always comes out the same way — the randomness is seeded from the text itself, so this is safe to run twice and possible to write tests against.

What each level does

Levels stack: each one includes everything below it. Links, e-mail addresses, @handles, #tags, anything in backticks and file-like tokens are left alone at every level, so pasting a message with a URL in it does not produce a broken URL.

Use it in your own code

<script src="https://catgirls.zone/nyanifier/nyanify.js"></script>
<script>
  nyanify("hello there")           // level 2 by default
  nyanify("hello there", 4)        // pick a level
  nyanify(text, { level: 3, keep: [/:\w+:/g] })   // protect your own patterns
</script>

The same file works as a CommonJS module — require("./nyanify.js") — and there is a command line wrapper next to it:

curl -O https://catgirls.zone/nyanifier/nyanify.js
curl -O https://catgirls.zone/nyanifier/cli.js

echo "hello there" | node cli.js --level 4
node cli.js --level 2 "hello there"

Public domain, no dependencies, about 4 KB. Copy it into your project rather than taking a dependency on this domain staying up.