Skip to content

Instantly share code, notes, and snippets.

@kanakiyajay
Forked from indexzero/base64.js
Created August 4, 2014 10:41
Show Gist options
  • Save kanakiyajay/e80479c6551247a25307 to your computer and use it in GitHub Desktop.
Save kanakiyajay/e80479c6551247a25307 to your computer and use it in GitHub Desktop.
//
// Super simple base64 encoding / decoding with node.js
//
var base64 = exports = {
encode: function (unencoded) {
return new Buffer(unencoded).toString('base64');
},
decode: function (encoded) {
return new Buffer(encoded, 'base64').toString('utf8');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment