diff --git a/btoa/index.js b/btoa/index.js index 350cd4b..4c00e7b 100644 --- a/btoa/index.js +++ b/btoa/index.js @@ -2,7 +2,7 @@ "use strict"; function btoa(str) { - return new Buffer(str, 'binary').toString('base64'); + return new Buffer(str.toString(), 'binary').toString('base64'); } module.exports = btoa;