A fun JavaScript text-garbler using Unicode combining characters (diacritics).
You can try it out in the browser here.
This library exports a function (named garble
for browser users) that garbles
text in a random fashion using Unicode combining characters (diacritics). For
example:
var garble = require("garble");
console.log(garble("hello, world"));
// h͚̠̙̒e̖͇ͬ̕ļ̹̯ͩl̘ͮ͢͞o̷̪͓ͅ,͚̑̊͢ ̤̫̿͌w̥̦̹͢ö̥͊͜r̜̓̅͘l̓̉̀͝d̫́̉
It takes additional parameters to control the minimum and maximum number of diacritics added to each character (defaults to 20-30):
var garble = require("garble");
console.log(garble("hello, world", 0, 1));
// ḧe̟l͕l̝o, w̅orl̢d̅
Included in the npm package is a CLI executable that garbles the input. For example:
garble
hello world
h̤̊͟͏e̵̖̠̚l̫ͬ͠ͅl͚̓̀ͤo̜̻̔͆ ͓͗͒̕w̧ͩ̂̒ơ̵̙̊r̬ͫ̾̔l̺͔͓ͦd̷̘͈̾
This is also available using docker. You can build it from source by running
docker build -t garble .
docker run -it garble
hello world
h̤̊͟͏e̵̖̠̚l̫ͬ͠ͅl͚̓̀ͤo̜̻̔͆ ͓͗͒̕w̧ͩ̂̒ơ̵̙̊r̬ͫ̾̔l̺͔͓ͦd̷̘͈̾
Or to use the image deployed to Docker Hub as a trusted build:
docker run -it nubs/garble
hello world
h̤̊͟͏e̵̖̠̚l̫ͬ͠ͅl͚̓̀ͤo̜̻̔͆ ͓͗͒̕w̧ͩ̂̒ơ̵̙̊r̬ͫ̾̔l̺͔͓ͦd̷̘͈̾
garble is licensed under the MIT license. See LICENSE for the full license text.