const key = {
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:'/'
};
function encode(text) {
return text.toLowerCase().split('').map(ch => key[ch] || ch).join('');
}
↓ Read more... ↓