0.0.1 • Published 8 years ago

onespace v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

onespace

̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡ Encode and decode a string of (a subset of) ASCII as a single character using combining diacritical marks. Credit for the original idea goes to @aemkei. Can be used in node or any modern browser.

API

npm i onespace --save
const fs = require('fs'),
    onespace = require('onespace');

eval(onespace.convert(fs.readFileSync('encodedfile.js', 'utf8')));

onespace.convert is both the encoder and decoder.

onespace.convert(onespace.convert('a')) === 'a';

CLI

npm i onespace -g
onespace <glob of files to convert> [<output folder>]