garble

0.1.1 • Public • Published

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̅

Package Sidebar

Install

npm i garble

Weekly Downloads

3

Version

0.1.1

License

none

Last publish

Collaborators

  • nubs