exercise working through Nicholas Zakas' great article Computer science in JavaScript: Base64 encoding to learn how Base64 works. not encluded: the pages of pen + paper translating that preceded this.
var Base64 = require('./');
console.log(Base64.encode('dark dungeons'));
// ZGFyayBkdW5nZW9ucw==
console.log(Base64.decode('ZGFyayBkdW5nZW9ucw=='));
// 'dark dungeons'