{"_id":"@0x04/string-mutilator","_rev":"4-7a202f3e9f6ac8ded72d70fa6b8002d9","name":"@0x04/string-mutilator","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"author":{"name":"Oliver Kühn","email":"ok@0x04.de"},"ava":{"require":["@babel/register"]},"bin":{"string-mutilator":"cli.js"},"dependencies":{},"description":"A JavaScript library for mutilate strings.","devDependencies":{"@babel/cli":"7.5.5","@babel/core":"7.5.5","@babel/plugin-proposal-class-properties":"7.5.5","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/plugin-transform-modules-umd":"^7.9.0","@babel/preset-env":"7.5.5","@babel/register":"^7.9.0","ava":"^2.4.0","jsdoc-to-markdown":"^5.0.3","rimraf":"2.6.3"},"license":"MIT","main":"index.js","name":"@0x04/string-mutilator","repository":{"type":"git","url":"git+ssh://git@github.com/0x04/string-mutilator.git"},"scripts":{"build":"babel src --out-dir lib","clean":"rimraf lib","docs:build":"jsdoc2md --template template-readme.hbs --files src/*.js > readme.md","prebuild":"npm run clean","prepublish":"npm run build","prewatch":"npm run clean","test":"ava --verbose","watch":"babel src --out-dir lib --watch"},"version":"1.0.0","gitHead":"ca147c60315317206d1f167bd1e93471b50930a3","bugs":{"url":"https://github.com/0x04/string-mutilator/issues"},"homepage":"https://github.com/0x04/string-mutilator#readme","_id":"@0x04/string-mutilator@1.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-IhVzH09Rk0IaYdgr1uO5geEz6kqeVp2spcHOJ98/FN6F3XpYX2l0chs2wtC5ZpW1e55+Xj9T+R9abs6C7dsu2w==","shasum":"9025f29a14beec7c6556cfcd1e02a935c2201511","tarball":"https://registry.npmjs.org/@0x04/string-mutilator/-/string-mutilator-1.0.0.tgz","fileCount":18,"unpackedSize":43277,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeW49CRA9TVsSAnZWagAAlEgP+wY4Us8TMoCyfCFJRBeU\naQYc/aMP2mvZzPRz+9BnGDgUAZXpcnvir4wd4v1FWuWueS9vuAGoqO0FFX7M\ne/7LaAXYaaJmwMx0JoGdyQMea/6/QNZ+pRmLBVfZPfh9oVdyYG80ytTz/Ap/\nsTT+XFHzUuLAoJieadPs0jq2HMLWD9Ox0J7nyKqNgfbs4mPCjTUhg6U+nVgf\nnX1QLKpwFhiyz8TrWrN0QtQle1RlbnbSZN8KoU0c3AFmgvnH4TZY4HRt/qOZ\nZWQCsx5r3YnTqXennFC+S1IyYIy6O68x9718gXBB0F8u0naS6WqJN7M5bUQe\nqGLpsA3P2I59QtExkw3hg9A4CLaJ7vjvn+DC35tF0Ko5Sd8L2C25EmSkpePX\nhar3XTmYLUbnDQdh9cgOV46GxlZUq/8FJyX26IKqS8PYpyqRmNNpgsDQYpWt\nkjWT1gxjeUhQVtXtcSU15INwiH7/EUsnld33dCwYO4ckJrogdlO8hif3a04H\nQ2zgPCYbz3AOYjQkRCpJ2BsAhMEbBHbza18SxRGQwfAr38qd1Pt5YQ9A9HMN\nMntZZJQ7iLyoauKjAkFcF0uL8uc1J1LS1XzHSVTQmv4w5DtCwSdM8JlERpNM\nkmXjpnpaqnD6U44/b/wpQM4D0eeJzQvpNN2y2d3TaZurTMFGFxvYEA7gAsEw\nq0Wk\r\n=J0k3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAyy22ElwsZ/5WskJ/x1ISfDN0sn8eMgKA4wNOOUGw37AiEAmtLPEDGWVu1W2Y/0R4xMcQFLMaiVdsDpjhdYHpXaRjM="}]},"maintainers":[{"name":"0x04","email":"ok@0x04.de"}],"_npmUser":{"name":"0x04","email":"ok@0x04.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-mutilator_1.0.0_1585016380588_0.12140033223773816"},"_hasShrinkwrap":false},"1.0.1":{"author":{"name":"Oliver Kühn","email":"ok@0x04.de"},"ava":{"require":["@babel/register"]},"bin":{"string-mutilator":"cli.js"},"dependencies":{},"description":"A JavaScript library for mutilate strings.","devDependencies":{"@babel/cli":"7.5.5","@babel/core":"7.5.5","@babel/plugin-proposal-class-properties":"7.5.5","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/plugin-transform-modules-umd":"^7.9.0","@babel/preset-env":"7.5.5","@babel/register":"^7.9.0","ava":"^2.4.0","jsdoc-to-markdown":"^5.0.3","rimraf":"2.6.3"},"license":"MIT","main":"index.js","name":"@0x04/string-mutilator","repository":{"type":"git","url":"git+ssh://git@github.com/0x04/string-mutilator.git"},"scripts":{"build":"babel src --out-dir lib","clean":"rimraf lib","docs:build":"jsdoc2md --template template-readme.hbs --files src/*.js > readme.md","prebuild":"npm run clean","prepublish":"npm run build","prewatch":"npm run clean","test":"ava --verbose","watch":"babel src --out-dir lib --watch"},"version":"1.0.1","gitHead":"333cbe19a453afec7fc682fa9d3cf282668d4775","bugs":{"url":"https://github.com/0x04/string-mutilator/issues"},"homepage":"https://github.com/0x04/string-mutilator#readme","_id":"@0x04/string-mutilator@1.0.1","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-TXXlYL9mzBkhFAPouS2kEVb3KV31p3/IA1Oq3og60EIfZ23m47rzs5EZKjKTOk7fUNl1+mk4YRDTswa64Z/mfQ==","shasum":"be398952e9ad12f4de13b8807942e8e287846be0","tarball":"https://registry.npmjs.org/@0x04/string-mutilator/-/string-mutilator-1.0.1.tgz","fileCount":18,"unpackedSize":43305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeeXe7CRA9TVsSAnZWagAAr4AP/ih7Gil8nZwmmDXOONpC\ny67txex6/X28HNdguI++s+V5lOtiMTbx8/ohZwt8rmchDtYbA7cHwd3nZKfF\n0mWAEzVr29I5CBukzMwrdneXScC4i4AIt+RH/YpSnslS1alRDs263zvYo6Qx\ntgm0uo55U0DbOwIqbQS+3ZzrvL5IJtGi8ZA/q23xBeJysq2A499c2ST5bT8e\nzTctAIX3Ly6O6HQsucE5FE5H5VcQqpzQ36XdGLlDhOcUdt1j3O3ynkTLqFq0\n8GqNrcVHCnnJjJ1Rqg+X4mXHmQ7X4cD7ivuZHHcOLoyxni8H2gAz3tO/Cezi\nziGVCegYvLvISyuDavn+qTzCqGswB0ajThncFUFIZitaqY/1oghXOu/JB8ks\nzcY+A/16RTYIwu2g8Ovr2/vSxaujXEovkPGP0Ji/UktdSHptZtttQ88gsWgW\nxiLZ6IUNHoWpt8wGI8CnluKUxCKT/GhYk8NIrhg8sL9yYjMKyuuNUu1Rv6IT\nnV5MCPzF+UFBfdtteFFWh22Shm0XSb145py/txnD1cn/9dKQ2o4qd//kTH9o\nsC26aBuHxRmV0LKN0OwTIVIGqcz9WgnQqriXxaZsb+2Nq8VFHuF5Cdtqpprp\niYlql4IfXXZI3rvrQKSofKFevGP8DN4rHbU7WU6Xrp+AclFCQeCf/BlKAx5m\ncdlF\r\n=Lirx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8MbI8BYg20ZkYKTt2cINMTe6Ak9a3Yvmxm8kKARf04QIgBh2CIq3OVp4BQgfGWTp13CZh86o2MFbdw5i+iIATszI="}]},"maintainers":[{"name":"0x04","email":"ok@0x04.de"}],"_npmUser":{"name":"0x04","email":"ok@0x04.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-mutilator_1.0.1_1585018811421_0.48460615973267807"},"_hasShrinkwrap":false},"1.1.0":{"author":{"name":"Oliver Kühn","email":"ok@0x04.de"},"ava":{"require":["@babel/register"]},"bin":{"string-mutilator":"cli.js"},"dependencies":{},"description":"A JavaScript library for mutilate strings.","devDependencies":{"@babel/cli":"7.5.5","@babel/core":"7.5.5","@babel/plugin-proposal-class-properties":"7.5.5","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/plugin-transform-modules-umd":"^7.9.0","@babel/preset-env":"7.5.5","@babel/register":"^7.9.0","ava":"^2.4.0","jsdoc-to-markdown":"^5.0.3","rimraf":"2.6.3","standard-version":"^7.1.0"},"license":"MIT","main":"index.js","name":"@0x04/string-mutilator","repository":{"type":"git","url":"git+ssh://git@github.com/0x04/string-mutilator.git"},"scripts":{"build":"babel src --out-dir lib","clean":"rimraf lib","docs:build":"jsdoc2md --template template-readme.hbs --files src/*.js > readme.md","prebuild":"npm run clean","prepublish":"npm run build","prewatch":"npm run clean","release":"standard-version","test":"ava --verbose","watch":"babel src --out-dir lib --watch"},"version":"1.1.0","gitHead":"ab21ddba5bdcc8f644052596bf68f6a074ba54bb","bugs":{"url":"https://github.com/0x04/string-mutilator/issues"},"homepage":"https://github.com/0x04/string-mutilator#readme","_id":"@0x04/string-mutilator@1.1.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-qX0NL5FPxdPMcMaqYHHBbn/8GR22Pp7NGyF1/2FgBK+sIEC+Go0t/rwccmVv5f9kfSTbdY1CGAFbuJK3YUP8Dg==","shasum":"842ebb3d2ae82aadd5babefdc76362d0570c6f30","tarball":"https://registry.npmjs.org/@0x04/string-mutilator/-/string-mutilator-1.1.0.tgz","fileCount":21,"unpackedSize":54259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerd3MCRA9TVsSAnZWagAAkEQP/2GHkRI+lK6nDMzwXmuP\n0GE18frVbJqGF8ISN2PJThX8Wt4x59QOe1Mn+Qrq8TAs3iE8ES+0ZHTXoDXe\nCDFIwiBcIgaSjeCJ1Bndauk3HoJ36ffGl1NWDmgbu8ojbrJDnyNLZ1z7RgI5\nv+eQKkSPjtpyYB/6rfmkSde/d8Lns1A/kqTBAaK7QTxhSlWxYd+P43TvYDDu\nxRGp3TF3vPPXeywTSKdhs2YgmA9yS3TpAdpBN1d9lGC4u0ILe8zXTffTjUez\nmhQ8aKFKb79TgPW1XeePxxelYwCHgY0zHr8Ojn8Unvh2HFKU7ey6ejPc/L9L\nTq4S8yItm5JM0jzBDc+QPkxGP2nEEkEy56qI1fLyIM5FDYfoPWiAd1Fz8UIT\nIZGV1g+EETWPJzZCjg1Mw1k0ZOq+l4VxM9RWkegSHLNxCeUcyITAb7OatoUl\n98+9YpSWqPUMrtDJIAqdJpbCyoVp5WzJ05u/zYR84r/uObul+X6y/z7rcsa1\nhuyEo5p02wVkxhpBIn+5IIX09wyLRncGV3PmPIUP98qFLOOJr734+yHVjB28\nbjaQDbp6LrgXzolCLxIxrXZF8E8dLgnmOUE6VFOz6FyDp7jEq69vQT0UvNhC\ngWKEoVq1NfcyCo7Ef1Z8DQPAEjcrjeQ3lK40m4Llt9zTE38yV8CK45BpsZCB\nnC0r\r\n=UREj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICCNl26wn/5rBWyaDzCp948KTwygADUOZgET9Y85v5RPAiEAoaXgVpcdMdClGem1x1B7a7Vl7O846BjpCTqH+3S2qK0="}]},"maintainers":[{"name":"0x04","email":"ok@0x04.de"}],"_npmUser":{"name":"0x04","email":"ok@0x04.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-mutilator_1.1.0_1588452811726_0.7455037315608102"},"_hasShrinkwrap":false},"1.2.0":{"author":{"name":"Oliver Kühn","email":"ok@0x04.de"},"ava":{"require":["@babel/register"]},"bin":{"string-mutilator":"cli.js"},"dependencies":{},"description":"A JavaScript library for mutilate strings.","devDependencies":{"@babel/cli":"7.5.5","@babel/core":"7.5.5","@babel/plugin-proposal-class-properties":"7.5.5","@babel/plugin-proposal-object-rest-spread":"7.5.5","@babel/plugin-transform-modules-umd":"^7.10.4","@babel/preset-env":"7.5.5","@babel/register":"^7.11.5","ava":"^2.4.0","jsdoc-to-markdown":"^5.0.3","rimraf":"2.6.3","standard-version":"^7.1.0"},"license":"MIT","main":"index.js","name":"@0x04/string-mutilator","repository":{"type":"git","url":"git+ssh://git@github.com/0x04/string-mutilator.git"},"scripts":{"build":"babel src --out-dir lib","clean":"rimraf lib","docs:build":"jsdoc2md --template template-readme.hbs --files src/*.js > readme.md","prebuild":"npm run clean","prepublish":"npm run build","prewatch":"npm run clean","release":"standard-version","test":"ava --verbose","watch":"babel src --out-dir lib --watch"},"version":"1.2.0","gitHead":"362a1891eda9cc98ec20b5c56ea4320f9577c3fe","bugs":{"url":"https://github.com/0x04/string-mutilator/issues"},"homepage":"https://github.com/0x04/string-mutilator#readme","_id":"@0x04/string-mutilator@1.2.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-BqamkRU/GLEUOJvNHTiTckiZWoWt8asQl/c/Wg0RPclDrEhGPfGQTLhp6A4HXyltlzqCWMqd4l7IIcnvjvsVog==","shasum":"e47fc784d17029b499f78799f42bcccfbd94535d","tarball":"https://registry.npmjs.org/@0x04/string-mutilator/-/string-mutilator-1.2.0.tgz","fileCount":21,"unpackedSize":61894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT78pCRA9TVsSAnZWagAAYuMP+wWqenebjDp2apA2Isug\nXG8FXlEZsk73MLreOe2ZR3MbGx2Gpavnqjs2XGebFmlAfNQY/Iu7gp0keAUg\ns603kTda+Sn80kH+CV2s8JfyFHEIx4oGFTPv4xTSphZ+elhxPxY6IIeObmes\nbH8CEhi7XkFKAf4KMMH/woVVCcRhsSKZlicwOShjSwxnIa9PMsNwl2/INGXT\n3UNKMtwMMFu+MdIypBqnXCsVlolxJXYfv/FkvTmPOM/YU3n7O31Gyg06uCIY\nC2CfJaVbsdqw+xHdaOdQJk52Jzbxw0gImiS+Yv2Tdw278YH8X2RzR6lgExoI\nvscM05ETYd4OKyveu2zsMjSZS/ZqZkWJIOATAVAyRcI5zV05oIuS2EP+NGnx\nlEIGRMK2hrCg/gdUwxEI8iLGb1Dt+WRjLGJh1lWZ/2H1YxajXgVsnVVDVGru\n77m6HRauGe/nLW3lbqO0Ks/cEQvw58tmKuWGE71+1Xyu7KMfHp8z7ESlTaW3\nk6VYh2PBwoW0sagY184a+jzUMIumd2BeUMTD7C+2jPQVDcYnxdVcfMyXEZYV\nx8svyBnt3DtCjz4pL6Hr9yVy/8NtSLWQYy7JN9NxOABeVsaPP0WlKwLgWk+o\n/y5rsxjPrF28zYQhJlHjH2iFPxUir97Xw/j/NniI1ALqefxD5XOhbUGwzCfW\nwvcC\r\n=3xxJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD5TpB1R3V3kwSTDDAo5oVG0VpOUjdc9UZ1vrR0ZIhQQIhALSca7xp7pS/w9v0td/KDmr1IpMx9F6NkdAZpRK/UVKG"}]},"maintainers":[{"name":"0x04","email":"ok@0x04.de"}],"_npmUser":{"name":"0x04","email":"ok@0x04.de"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-mutilator_1.2.0_1599061801161_0.023957451692969034"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-24T02:19:40.358Z","1.0.0":"2020-03-24T02:19:40.750Z","modified":"2022-04-04T10:27:32.161Z","1.0.1":"2020-03-24T03:00:11.586Z","1.1.0":"2020-05-02T20:53:31.848Z","1.2.0":"2020-09-02T15:50:01.351Z"},"maintainers":[{"name":"0x04","email":"ok@0x04.de"}],"description":"A JavaScript library for mutilate strings.","homepage":"https://github.com/0x04/string-mutilator#readme","repository":{"type":"git","url":"git+ssh://git@github.com/0x04/string-mutilator.git"},"author":{"name":"Oliver Kühn","email":"ok@0x04.de"},"bugs":{"url":"https://github.com/0x04/string-mutilator/issues"},"license":"MIT","readme":"# string-mutilator\n\nA JavaScript library for mutilate strings.\n\n[![MIT license][license-badge]][license]\n\n\n## Motivation background\n\nMost of the code from this project was created during a personal codegolf\ncompetition to distort the appearance of strings as much as possible but\nwithout actually destroying their contents.\n\nSo the name [`mutilator`][mutilator] come into my mind.\n\n> mutilator (plural mutilators)\n> 1. Agent noun of mutilate; one who mutilates.\n\nThis sounds unnecessarily brutal for now, but I assure you that no strings\nwill be harmed permanently, as long as the functions are used correctly. :smirk:\n\nSo I decided to combine these \"strange\" functions into one library.\nMore or less just for fun.\n\n\n## Demo\n\nA [comprehensive demo][pseudo-cipherer-demo] of all functions can be found in\nthe demonstration of this library/package in the demo project\n[`pseudeo-chiperer`][pseudo-cipherer-repo].\n\n\n## Table of content\n\n1. [Modules](#user-content-module)\n2. [Functions](#user-content-functions)\n3. [Involutory functions](#user-content-involutory-functions)\n4. [Using the CLI](#user-content-using-the-cli)\n\n\n## Modules\n\n<dl>\n<dt><a href=\"#module_stringMutilator/charCase\">stringMutilator/charCase</a></dt>\n<dd><p>Functions for manipulating the letter case of strings.</p>\n</dd>\n<dt><a href=\"#module_stringMutilator/compressor\">stringMutilator/compressor</a></dt>\n<dd><p>Functions for compressing (pack/unpack etc.) strings.</p>\n</dd>\n<dt><a href=\"#module_stringMutilator\">stringMutilator</a></dt>\n<dd><p>Functions for mutilating strings.</p>\n</dd>\n<dt><a href=\"#module_stringMutilator/unicode\">stringMutilator/unicode</a></dt>\n<dd><p>Functions for handle unicode stuff.</p>\n</dd>\n</dl>\n\n## Functions\n\n<dl>\n<dt><a href=\"#flipBits\">flipBits(string)</a> ⇒ <code>string</code></dt>\n<dd><p>Flip the character bits of a string. The 16 character bits of <code>&#39;A&#39;</code> are\n<code>00000000 01000001</code> - if we flip the bits (so every 0 becomes 1 and vice\nversa) they look like this <code>11111111 10111110</code>. This means that <code>&#39;A&#39;</code>\n(<code>U+0041</code>) becomes <code>&#39;ﾾ&#39;</code> (<code>U+FFBE</code>).</p>\n</dd>\n<dt><a href=\"#gobbledygook\">gobbledygook(string, [exclude])</a> ⇒ <code>string</code></dt>\n<dd><p>Applies <code>toMANS</code> to all characters with a random <code>type</code>.\nFor example <code>&#39;Hello World&#39;</code> turns into <code>&#39;𝐇𝖾𝓵𝗹𝘰 𝔚𝗈𝒓𝔩𝔡&#39;</code>.</p>\n</dd>\n<dt><a href=\"#jumble\">jumble(string, [runs])</a> ⇒ <code>string</code></dt>\n<dd><p>Jumble the letters of all words in a string,\nexcept the first and last one, to keep it readable.</p>\n</dd>\n<dt><a href=\"#reverseBits\">reverseBits(string)</a> ⇒ <code>string</code></dt>\n<dd><p>Reverse the character bits of a string. The 16 character bits of <code>&#39;A&#39;</code> are\n<code>00000000 01000001</code> - if we reverse the bits they look like this\n<code>10000010 00000000</code>. This means that <code>&#39;A&#39;</code> (<code>U+0041</code>) becomes <code>&#39;舀&#39;</code>\n(<code>U+8200</code>).</p>\n</dd>\n<dt><a href=\"#reverse\">reverse(string)</a> ⇒ <code>string</code></dt>\n<dd><p>Reverse a string.</p>\n</dd>\n<dt><a href=\"#rockdotize\">rockdotize(string, [regexp])</a> ⇒ <code>string</code></dt>\n<dd><p>Create a heavy metal like rockdot string.</p>\n</dd>\n<dt><a href=\"#rot13\">rot13(string)</a> ⇒ <code>string</code></dt>\n<dd><p>Rotate the character indexes of a string by 13 digits.</p>\n</dd>\n<dt><a href=\"#scramble\">scramble(string)</a> ⇒ <code>string</code></dt>\n<dd><p>Randomize the order of the characters in a string.</p>\n</dd>\n<dt><a href=\"#shiftBits\">shiftBits(string, [n])</a> ⇒ <code>string</code></dt>\n<dd><p>Rotate the character bits of a string. The 16 character bits of <code>&#39;A&#39;</code> are\n<code>00000000 01000001</code> - if we shift the bits by -4 <code>n</code> digits they look like\nthis <code>00010000 00000100</code>. This means that <code>&#39;A&#39;</code> (<code>U+0041</code>) becomes <code>&#39;င&#39;</code>\n(<code>U+1004</code>).</p>\n</dd>\n<dt><a href=\"#shift\">shift(string, [n])</a> ⇒ <code>string</code></dt>\n<dd><p>Shift the characters of a string by <code>n</code> digits.</p>\n</dd>\n<dt><a href=\"#toMANS\">toMANS(string, [type])</a> ⇒ <code>string</code></dt>\n<dd><p>Convert A-Z to <strong>M</strong>athematical <strong>A</strong>lpha<strong>n</strong>umeric <strong>S</strong>ymbols.</p>\n<p>List of <code>type</code> values:</p>\n<table>\n<thead>\n<tr>\n<th><code>type</code></th>\n<th>Unicode name</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>Mathematical Bold *</td>\n</tr>\n<tr>\n<td>1</td>\n<td>Mathematical Italic *</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Mathematical Bold Italic *</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Mathematical Script Capital *</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Mathematical Bold Script *</td>\n</tr>\n<tr>\n<td>5</td>\n<td>Mathematical Fraktur *</td>\n</tr>\n<tr>\n<td>6</td>\n<td>Mathematical Double-Struck *</td>\n</tr>\n<tr>\n<td>7</td>\n<td>Mathematical Bold Fraktur *</td>\n</tr>\n<tr>\n<td>8</td>\n<td>Mathematical Sans-Serif *</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Mathematical Sans-Serif Bold *</td>\n</tr>\n<tr>\n<td>10</td>\n<td>Mathematical Sans-Serif Italic *</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Mathematical Sans-Serif Bold Italic *</td>\n</tr>\n<tr>\n<td>12</td>\n<td>Mathematical Monospace *</td>\n</tr>\n</tbody></table>\n</dd>\n</dl>\n\n<a name=\"module_stringMutilator/charCase\"></a>\n\n## stringMutilator/charCase\nFunctions for manipulating the letter case of strings.\n\n\n* [stringMutilator/charCase](#module_stringMutilator/charCase)\n    * [~invert(string, [every])](#module_stringMutilator/charCase..invert) ⇒ <code>string</code>\n    * [~snakeCase(string)](#module_stringMutilator/charCase..snakeCase) ⇒ <code>string</code>\n    * [~camelCase(string)](#module_stringMutilator/charCase..camelCase) ⇒ <code>string</code>\n    * [~kebabCase(string)](#module_stringMutilator/charCase..kebabCase) ⇒ <code>string</code>\n    * [~dotCase(string)](#module_stringMutilator/charCase..dotCase) ⇒ <code>string</code>\n    * [~pascalCase(string)](#module_stringMutilator/charCase..pascalCase) ⇒ <code>string</code>\n    * [~capitalize(string)](#module_stringMutilator/charCase..capitalize) ⇒ <code>string</code>\n\n<a name=\"module_stringMutilator/charCase..invert\"></a>\n\n### stringMutilator/charCase~invert(string, [every]) ⇒ <code>string</code>\nInvert the case of letters in a string.\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The string to be case inverted. |\n| [every] | <code>number</code> | <code>0</code> | Only invert every `n` letter. |\n\n**Example**  \n```js\nstringMutilator.charCase.invert('Hello World!');\n// > 'hELLO wORLD!'\n```\n<a name=\"module_stringMutilator/charCase..snakeCase\"></a>\n\n### stringMutilator/charCase~snakeCase(string) ⇒ <code>string</code>\nChange the case of given string to \"Snake Case\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.snakeCase('Hello World');\n// > 'hello_world'\n```\n<a name=\"module_stringMutilator/charCase..camelCase\"></a>\n\n### stringMutilator/charCase~camelCase(string) ⇒ <code>string</code>\nChange the case of the given string to \"Camel Case\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.camelCase('Hello World');\n// > 'helloWorld'\n```\n<a name=\"module_stringMutilator/charCase..kebabCase\"></a>\n\n### stringMutilator/charCase~kebabCase(string) ⇒ <code>string</code>\nChange the case of the given string to \"Kebap Case\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.kebabCase('Hello World');\n// > 'hello-world'\n```\n<a name=\"module_stringMutilator/charCase..dotCase\"></a>\n\n### stringMutilator/charCase~dotCase(string) ⇒ <code>string</code>\nChange the case of the given string to \"Dot Case\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.dotCase('Hello World');\n// > 'hello.world'\n```\n<a name=\"module_stringMutilator/charCase..pascalCase\"></a>\n\n### stringMutilator/charCase~pascalCase(string) ⇒ <code>string</code>\nChange the case of the given string to \"Pascal Case\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.pascalCase('Hello World');\n// > 'HelloWorld'\n```\n<a name=\"module_stringMutilator/charCase..capitalize\"></a>\n\n### stringMutilator/charCase~capitalize(string) ⇒ <code>string</code>\nChange the case of the given string to \"Capitalized\".\n\n**Kind**: inner method of [<code>stringMutilator/charCase</code>](#module_stringMutilator/charCase)  \n\n| Param | Type |\n| --- | --- |\n| string | <code>string</code> | \n\n**Example**  \n```js\nstringMutilator.charCase.capitalize('hello world');\n// > 'Hello World'\n```\n<a name=\"module_stringMutilator/compressor\"></a>\n\n## stringMutilator/compressor\nFunctions for compressing (pack/unpack etc.) strings.\n\n\n* [stringMutilator/compressor](#module_stringMutilator/compressor)\n    * [~pack(string)](#module_stringMutilator/compressor..pack) ⇒ <code>string</code>\n    * [~unpack(string)](#module_stringMutilator/compressor..unpack) ⇒ <code>string</code>\n    * [~signature(string, [withEval])](#module_stringMutilator/compressor..signature) ⇒ <code>string</code>\n\n<a name=\"module_stringMutilator/compressor..pack\"></a>\n\n### stringMutilator/compressor~pack(string) ⇒ <code>string</code>\nPack all characters of a 8-bit string.\n\n**Kind**: inner method of [<code>stringMutilator/compressor</code>](#module_stringMutilator/compressor)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | A 8-bit string to pack. |\n\n**Example**  \n```js\nstringMutilator.compressor.pack('Hello World!');\n// > '䡥汬漠坯牬搡'\n```\n<a name=\"module_stringMutilator/compressor..unpack\"></a>\n\n### stringMutilator/compressor~unpack(string) ⇒ <code>string</code>\nUnpack a packed string.\n\n**Kind**: inner method of [<code>stringMutilator/compressor</code>](#module_stringMutilator/compressor)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The packed string to unpack. |\n\n**Example**  \n```js\nstringMutilator.compressor.unpack('䡥汬漠坯牬搡');\n// > 'Hello World!'\n```\n<a name=\"module_stringMutilator/compressor..signature\"></a>\n\n### stringMutilator/compressor~signature(string, [withEval]) ⇒ <code>string</code>\nReturn the given, packed string with the unpack signature.\n\n**Kind**: inner method of [<code>stringMutilator/compressor</code>](#module_stringMutilator/compressor)  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The packed string to signature. |\n| [withEval] | <code>boolean</code> | <code>false</code> | Determine if the result includes                  a `eval` command for executing code. |\n\n**Example**  \n```js\nstringMutilator.compressor.signature('䡥汬漠坯牬搡');\n// > 'unescape(escape(\"䡥汬漠坯牬搡\").replace(/u(..)/g, \"$1%\");'\n```\n<a name=\"module_stringMutilator\"></a>\n\n## stringMutilator\nFunctions for mutilating strings.\n\n<a name=\"module_stringMutilator/unicode\"></a>\n\n## stringMutilator/unicode\nFunctions for handle unicode stuff.\n\n\n* [stringMutilator/unicode](#module_stringMutilator/unicode)\n    * [~fixSurrogates(string)](#module_stringMutilator/unicode..fixSurrogates) ⇒ <code>string</code>\n    * [~unfixSurrogates(string)](#module_stringMutilator/unicode..unfixSurrogates) ⇒ <code>string</code>\n\n<a name=\"module_stringMutilator/unicode..fixSurrogates\"></a>\n\n### stringMutilator/unicode~fixSurrogates(string) ⇒ <code>string</code>\nFix unpaired high/low surrogates by adding a blank high/low surrogate\n(`U+D800` or `U+DC00`) to the designated location. An unpaired surrogate can\nlead to problems, for example by copying it to the clipboard could result in\na Replacement Character � (`U+FFFD`). For example if the string is\n`'\\uD801'` it will be altered to `'\\uD801\\uDC00'` (`'𐐀'`) or `'\\uDE80'` to\n`'\\uD800\\uDE80'` (`'𐊀'`).\n\n**Kind**: inner method of [<code>stringMutilator/unicode</code>](#module_stringMutilator/unicode)  \n**See**: https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string |\n\n**Example**  \n```js\nstringMutilator.unicode.fixSurrogates('Test: \\uD801 \\uDE80');\n// > 'Test: 𐐀 𐊀'\n```\n<a name=\"module_stringMutilator/unicode..unfixSurrogates\"></a>\n\n### stringMutilator/unicode~unfixSurrogates(string) ⇒ <code>string</code>\nRemove the by `fixSurrogates` added blank high/low surrogates.\n\n**Kind**: inner method of [<code>stringMutilator/unicode</code>](#module_stringMutilator/unicode)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string |\n\n**Example**  \n```js\nstringMutilator.unfixSurrogates('Test: 𐐀 𐊀');\n// > 'Test: \\uD801 \\uDE80'\n```\n<a name=\"flipBits\"></a>\n\n## flipBits(string) ⇒ <code>string</code>\nFlip the character bits of a string. The 16 character bits of `'A'` are\n`00000000 01000001` - if we flip the bits (so every 0 becomes 1 and vice\nversa) they look like this `11111111 10111110`. This means that `'A'`\n(`U+0041`) becomes `'ﾾ'` (`U+FFBE`).\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string. |\n\n**Example**  \n```js\nstringMutilator.flipBits('Hello World!');\n// > 'ﾷﾚﾓﾓﾐ￟ﾨﾐﾍﾓﾛ￞'\n```\n<a name=\"gobbledygook\"></a>\n\n## gobbledygook(string, [exclude]) ⇒ <code>string</code>\nApplies `toMANS` to all characters with a random `type`.\nFor example `'Hello World'` turns into `'𝐇𝖾𝓵𝗹𝘰 𝔚𝗈𝒓𝔩𝔡'`.\n\n**Kind**: global function  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The input string |\n| [exclude] | <code>array</code> | <code>[ 1, 2 ]</code> | Exclude specific `type` of `toMANS` |\n\n**Example**  \n```js\nstringMutilator.gobbledygook('Hello World');\n// > 𝐇𝖾𝓵𝗹𝘰 𝔚𝗈𝒓𝔩𝔡\n```\n<a name=\"jumble\"></a>\n\n## jumble(string, [runs]) ⇒ <code>string</code>\nJumble the letters of all words in a string,\nexcept the first and last one, to keep it readable.\n\n**Kind**: global function  \n**See**: https://www.mnn.com/lifestyle/arts-culture/stories/why-your-brain-can-read-jumbled-letters  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The input string. |\n| [runs] | <code>number</code> | <code>3</code> | The number of attempts to get a real randomized                        word string. |\n\n**Example**  \n```js\nstringMutilator.jumble('Hello World!');\n// > 'Hlelo Wrlod!'\n```\n<a name=\"reverseBits\"></a>\n\n## reverseBits(string) ⇒ <code>string</code>\nReverse the character bits of a string. The 16 character bits of `'A'` are\n`00000000 01000001` - if we reverse the bits they look like this\n`10000010 00000000`. This means that `'A'` (`U+0041`) becomes `'舀'`\n(`U+8200`).\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string. |\n\n**Example**  \n```js\nstringMutilator.reverseBits('Hello World!');\n// > 'ሀꘀ㘀㘀Ѐ一㘀☀萀'\n```\n<a name=\"reverse\"></a>\n\n## reverse(string) ⇒ <code>string</code>\nReverse a string.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string. |\n\n**Example**  \n```js\nstringMutilator.reverse('Hello World!');\n// > '!dlroW olleH'\n```\n<a name=\"rockdotize\"></a>\n\n## rockdotize(string, [regexp]) ⇒ <code>string</code>\nCreate a heavy metal like rockdot string.\n\n**Kind**: global function  \n**See**\n\n- https://en.wikipedia.org/wiki/Metal_umlaut\n- https://github.com/bullgit/rockdotizer\n\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The string to rockdotize. |\n| [regexp] | <code>RegExp</code> | <code>&lt;RegExp /\\w/gi&gt;</code> | A RegExp to select every character that should get rockdotized. |\n\n**Example**  \n```js\nstringMutilator.rockdotize('Hello World!');\n// > 'Ḧël̈l̈ö Ẅör̈l̈d̈!'\n```\n<a name=\"rot13\"></a>\n\n## rot13(string) ⇒ <code>string</code>\nRotate the character indexes of a string by 13 digits.\n\n**Kind**: global function  \n**See**: https://en.wikipedia.org/wiki/ROT13  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The input string. |\n\n**Example**  \n```js\nstringMutilator.rot13('Hello World!');\n// > 'Uryyb Jbeyq!'\n```\n<a name=\"scramble\"></a>\n\n## scramble(string) ⇒ <code>string</code>\nRandomize the order of the characters in a string.\n\n**Kind**: global function  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| string | <code>string</code> | The string to scramble. |\n\n**Example**  \n```js\nstringMutilator.scramble('Hello World!');\n// > 'WorH!llo led'\n```\n<a name=\"shiftBits\"></a>\n\n## shiftBits(string, [n]) ⇒ <code>string</code>\nRotate the character bits of a string. The 16 character bits of `'A'` are\n`00000000 01000001` - if we shift the bits by -4 `n` digits they look like\nthis `00010000 00000100`. This means that `'A'` (`U+0041`) becomes `'င'`\n(`U+1004`).\n\n**Kind**: global function  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The input string. |\n| [n] | <code>number</code> | <code>1</code> | Number of digits to rotate the character bit.                     Positive for right rotation,                     negative for left rotation. |\n\n<a name=\"shift\"></a>\n\n## shift(string, [n]) ⇒ <code>string</code>\nShift the characters of a string by `n` digits.\n\n**Kind**: global function  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The string to shift. |\n| [n] | <code>number</code> | <code>1</code> | Number of digits to rotate the characters.                     Positive for right rotation,                     negative for left rotation. |\n\n**Example**  \n```js\nstringMutilator.shift('Hello World!', 3);\n// > 'lo World!Hel'\n```\n<a name=\"toMANS\"></a>\n\n## toMANS(string, [type]) ⇒ <code>string</code>\nConvert A-Z to **M**athematical **A**lpha**n**umeric **S**ymbols.\n\nList of `type` values:\n\n| `type` | Unicode name |\n| --- | --- |\n| 0 | Mathematical Bold * |\n| 1 | Mathematical Italic * |\n| 2 | Mathematical Bold Italic * |\n| 3 | Mathematical Script Capital * |\n| 4 | Mathematical Bold Script * |\n| 5 | Mathematical Fraktur * |\n| 6 | Mathematical Double-Struck * |\n| 7 | Mathematical Bold Fraktur * |\n| 8 | Mathematical Sans-Serif * |\n| 9 | Mathematical Sans-Serif Bold * |\n| 10 | Mathematical Sans-Serif Italic * |\n| 11 | Mathematical Sans-Serif Bold Italic * |\n| 12 | Mathematical Monospace * |\n\n**Kind**: global function  \n**See**: https://unicode-table.com/en/blocks/mathematical-alphanumeric-symbols  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| string | <code>string</code> |  | The input string. |\n| [type] | <code>number</code> | <code>0</code> | A number between 0 and 12. |\n\n**Example**  \n```js\nstringMutilator.toMANS('Hello World!', 1);\n// > '𝐻𝑒𝑙𝑙𝑜 𝑊𝑜𝑟𝑙𝑑.'\n```\n\n\n## Involutory functions\n\n> An [involutory function][involution], is a function f that is its own inverse.\n\n### List of involutory functions\n\n* [`flipBits`](#flipBits)\n* [`reverse`](#reverse)\n* [`reverseBits`](#reverseBits)\n* [`rot13`](#rot13)\n\n**Example**\n\n```js\nimport { rot13 } from '@0x04/string-mutilator';\n\nrot13(rot13('Hello World!')) === 'Hello World!';\n// > true\n```\n\n### List of involutory functions with negated arguments\n\n* [`charCase.invert`](#module_stringMutilator/charCase..invert)\n* [`shift`](#shift)\n* [`shiftBits`](#shiftBits)\n\n**Example**\n\n```js\nimport { shift } from '@0x04/string-mutilator';\n\nshift(shift('Hello World!', 5), -5) === 'Hello World!';\n// > true\n```\n\n### List of involutory functions with counter function\n\n* [`compressor.pack`](#module_stringMutilator/compressor..pack) / [`compressor.unpack`](#module_stringMutilator/compressor..unpack)\n* [`unicode.fixSurrogates`](#module_stringMutilator/unicode..fixSurrogates) / [`unicode.unfixSurrogates`](#module_stringMutilator/unicode..unfixSurrogates)\n\n**Examples**\n\n```js\nimport { compressor } from '@0x04/string-mutilator';\n\ncompressor.unpack(compressor.pack('Hello World!')) === 'Hello World!';\n// > true\n```\n\n### List of non involutory functions\n\n* [`compressor.signature`](#module_stringMutilator/compressor..signature)\n* [`gobbledygook`](#gobbledygook)\n* [`jumble`](#jumble)\n* [`rockdotize`](#rockdotize)\n* [`scramble`](#scramble)\n* [`toMANS`](#toMANS)\n\n```js\nimport { jumble } from '@0x04/string-mutilator';\n\njumble(jumble('Hello World!')) === 'Hello World!';\n// > false\n```\n\n\n## Using the CLI\n\n### Install\n\n**To use it in your project**\n\n```bash\n$ npm install --save @0x04/string-mutilator\n```\n\n**To use it globally**\n\n```bash\n$ npm install --global @0x04/string-mutilator\n```\n\n### General usage\n\n```plain\n$ string-mutilator --help\n\n  Functions for mutilating strings.\n\n  Usage\n  $ string-mutilator <function> <string> [argument]...\n\n    Functions\n      charCase.invert\n      compressor.pack\n      compressor.unpack\n      compressor.signature\n      charCase.snakeCase\n      charCase.camelCase\n      charCase.kebabCase\n      charCase.dotCase\n      charCase.pascalCase\n      charCase.capitalize\n      flipBits\n      gobbledygook\n      jumble\n      reverse\n      reverseBits\n      rockdotize\n      rot13\n      scramble\n      shift\n      shiftBits\n      toMANS\n      unicode.fixSurrogates\n      unicode.unfixSurrogates\n\n    Examples\n      $ string-mutilator shift \"Hello World!\" 6\n      $ string-mutilator charCase.invert \"Hello World!\"\n      $ string-mutilator toMANS \"Hello World!\" 4\n```\n\n\n## License\n\n&copy; 2019 by [Oliver Kühn][0x04]. Released under the [MIT license][license].\n\n\n<!-- Badges -->\n[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge\n[license]: ./license\n\n\n<!-- Links -->\n[0x04]: mailto:ok@0x04.de\n[pseudo-cipherer-demo]: https://0x04.github.io/pseudo-cipherer\n[pseudo-cipherer-repo]: https://github.com/0x04/pseudo-cipherer\n\n<!-- Appendix -->\n[involution]: https://en.wikipedia.org/wiki/Involution_(mathematics)\n[mutilator]: https://en.wiktionary.org/wiki/mutilator\n","readmeFilename":"readme.md"}