Fix btoa to match browser implementations
Test case: btoa(String.fromCharCode(252)) should return "/A=="
这个提交包含在:
父节点
48288ef240
当前提交
133496cd12
@ -2,7 +2,7 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function btoa(str) {
|
function btoa(str) {
|
||||||
return new Buffer(str, 'utf8').toString('base64');
|
return new Buffer(str, 'binary').toString('base64');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = btoa;
|
module.exports = btoa;
|
||||||
|
正在加载...
x
在新工单中引用
屏蔽一个用户