From 00b5c148438d4542bbf311342bc419ffb7c8348a Mon Sep 17 00:00:00 2001 From: Victor Costan Date: Thu, 13 Sep 2012 02:15:36 -0300 Subject: [PATCH] Fix atob to match browser implementations Test case: atob('/A==') === String.fromCharCode(252) should be true --- atob/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atob/index.js b/atob/index.js index 72ddb40..e95f1e3 100644 --- a/atob/index.js +++ b/atob/index.js @@ -2,7 +2,7 @@ "use strict"; function atob(str) { - return new Buffer(str, 'base64').toString('utf8'); + return new Buffer(str, 'base64').toString('binary'); } module.exports = atob;