garble
v0.1.1
Published
A fun text-garbler using Unicode combining characters (diacritics).
Downloads
12
Maintainers
Readme
garble
A fun JavaScript text-garbler using Unicode combining characters (diacritics).
Usage
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̅