textmutant
Node package to mutate text into various other forms.
Install:
$ npm install textmutant
Examples:
const mutant = ; let text = 'Hello, how are you.'; console; // Upper: HELLO, HOW ARE YOU. console; // Flip: ˙noʎ ǝɹɐ ʍoɥ 'ollǝH console; // Reverse: .uoy era woh ,olleH console; // Random: ˙oaleol,yw hu ro .He console; // Teen: HELlo, hOw are yOU. console; // Color to hex: #ff69b4 var bin = mutant;console; // Text to binary: [binary stuff]console; // Binary to text: Hello, how are you.
Socket.io example
Mutate incoming text using short cuts (ie: /reverse text to reverse
).
const mutant = ; // input example: /reverse Hello, how are you // output: .uoy era woh ,olleHif msg == '/' let func = msg; if funclength >= 1 func = func1; if funclength && typeof mutantfunc === 'function' datamsg = mutantfuncmsg;