Fix btoa to match browser implementations
Test case: btoa(String.fromCharCode(252)) should return "/A=="
Bu işleme şunda yer alıyor:
ebeveyn
6547214a62
işleme
b51cbf6c06
2
index.js
2
index.js
@ -2,7 +2,7 @@
|
||||
"use strict";
|
||||
|
||||
function btoa(str) {
|
||||
return new Buffer(str, 'utf8').toString('base64');
|
||||
return new Buffer(str, 'binary').toString('base64');
|
||||
}
|
||||
|
||||
module.exports = btoa;
|
||||
|
||||
Yükleniyor…
x
Yeni konuda referans
Bir kullanıcı engelle