diff --git a/index.js b/index.js index 350cd4b..4c00e7b 100644 --- a/index.js +++ b/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;