btoa.js/index.js
Victor Costan b51cbf6c06 Fix btoa to match browser implementations
Test case:
btoa(String.fromCharCode(252)) should return "/A=="
2012-09-13 02:08:20 -03:00

10 lines
148 B
JavaScript

(function () {
"use strict";
function btoa(str) {
return new Buffer(str, 'binary').toString('base64');
}
module.exports = btoa;
}());