0.1.1 • Published 10 years ago

garble v0.1.1

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

garble

A fun JavaScript text-garbler using Unicode combining characters (diacritics).

Latest Stable Version Total Downloads License

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̅