fix typo-related bug
This commit is contained in:
джерело
8f2a49efd0
коміт
ed56a62799
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "unibabel",
|
||||
"main": "index.js",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"homepage": "https://github.com/coolaj86/unibabel-js",
|
||||
"authors": [
|
||||
"AJ ONeal <awesome@coolaj86.com>"
|
||||
|
||||
4
index.js
4
index.js
@ -36,9 +36,7 @@ function binaryStringToUtf8(binstr) {
|
||||
}
|
||||
|
||||
function bufferToUtf8(buf) {
|
||||
var binstr = Array.prototype.map.call(buf, function (ch) {
|
||||
return '0x' + String.fromCharCode(ch);
|
||||
}).join('');
|
||||
var binstr = bufferToBinaryString(buf);
|
||||
|
||||
return binaryStringToUtf8(binstr);
|
||||
}
|
||||
|
||||
Завантаження…
x
Посилання в новій задачі
Block a user