Call toString on args to match browser behavior.
This commit is contained in:
джерело
93ce8ddd9f
коміт
f76c0404fb
2
index.js
2
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;
|
||||
|
||||
Завантаження…
x
Посилання в новій задачі
Block a user