@anonymous/

BurlywoodFirsthandExperiments

ES6

No description

fork
loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.09908174456319863","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"Y29uc3QgdGFibGUgPSB7CkE6ICc8JywKQjogJ+KInicsCkM6ICdgJywKRDogJ8WSJywKRTogJ8OuJywKRjogJz4nLApHOiAnficsCkg6ICfFuCcsCkk6ICfCoycsCko6ICfCsScsCks6ICfil4onLApMOiAnXicsCk06ICcmJywKTjogJ8OnJywKTzogJyQnLApQOiAn4oyHJywKUTogJ+KAoicsClI6ICfCqicsClM6ICfiiKsnLApUOiAnwqEnLApVOiAn4oCUJywKVjogJ8KlJywKVzogJ8KuJywKWDogJ+KJpCcsClk6ICfigLknLApaOiAnw7gnLAonICc6ICcgJywKJ0AnOiAn4omgJywKJy4nOiAnwronCn07Cgpjb25zdCByZXZlcnNlZCA9IE9iamVjdC52YWx1ZXModGFibGUpLnJlZHVjZSgoYWNjLCBsZXR0ZXIsIGluZGV4KSA9PiB7YWNjW2xldHRlcl0gPSBPYmplY3Qua2V5cyh0YWJsZSlbaW5kZXhdOyByZXR1cm4gYWNjO30sIHt9KQoKCmNvbnN0IGVuY29kZSA9IHRleHQgPT4gdGV4dC50b1VwcGVyQ2FzZSgpLnNwbGl0KCcnKS5tYXAoY2hhciA9PiB0YWJsZVtjaGFyXSkuam9pbignJykKCmNvbnN0IGRlY29kZSA9IHRleHQgPT4gdGV4dC5zcGxpdCgnJykubWFwKGNoYXIgPT4gcmV2ZXJzZWRbY2hhcl0pLmpvaW4oJycpCgovL2NvbnNvbGUubG9nKGRlY29kZSgn4oirxbg8JsKjwqriiKsgfjwmw64nKSkKY29uc29sZS5sb2coZW5jb2RlKCJTaGFtaXIncyBnYW1lIikp"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const table = {
A: '<',
B: '∞',
C: '`',
D: 'Œ',
E: 'î',
F: '>',
G: '~',
H: 'Ÿ',
I: '£',
J: '±',
K: '◊',
L: '^',
M: '&',
N: 'ç',
O: '$',
P: '⌇',
Q: '•',
R: 'ª',
S: '∫',
T: '¡',
U: '—',
V: '¥',
W: '®',
X: '≤',
Y: '‹',
Z: 'ø',
' ': ' ',
'@': '≠',
'.': 'º'
};

const reversed = Object.values(table).reduce((acc, letter, index) => {acc[letter] = Object.keys(table)[index]; return acc;}, {})


const encode = text => text.toUpperCase().split('').map(char => table[char]).join('')

const decode = text => text.split('').map(char => reversed[char]).join('')

//console.log(decode('∫Ÿ<&£ª∫ ~<&î'))
console.log(encode("Shamir's game"))
Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie