fix typo-related bug
This commit is contained in:
parent
8f2a49efd0
commit
ed56a62799
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "unibabel",
|
"name": "unibabel",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"homepage": "https://github.com/coolaj86/unibabel-js",
|
"homepage": "https://github.com/coolaj86/unibabel-js",
|
||||||
"authors": [
|
"authors": [
|
||||||
"AJ ONeal <awesome@coolaj86.com>"
|
"AJ ONeal <awesome@coolaj86.com>"
|
||||||
|
|
4
index.js
4
index.js
|
@ -36,9 +36,7 @@ function binaryStringToUtf8(binstr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function bufferToUtf8(buf) {
|
function bufferToUtf8(buf) {
|
||||||
var binstr = Array.prototype.map.call(buf, function (ch) {
|
var binstr = bufferToBinaryString(buf);
|
||||||
return '0x' + String.fromCharCode(ch);
|
|
||||||
}).join('');
|
|
||||||
|
|
||||||
return binaryStringToUtf8(binstr);
|
return binaryStringToUtf8(binstr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue