do not provide unused encoding in constructor
This commit is contained in:
4
index.js
4
index.js
@@ -1509,10 +1509,10 @@ function numberToBits(number, bitLength) {
|
|||||||
return bits;
|
return bits;
|
||||||
}
|
}
|
||||||
function bytesToText(bytes) {
|
function bytesToText(bytes) {
|
||||||
return new TextDecoder(encoding).decode(bytes);
|
return new TextDecoder().decode(bytes);
|
||||||
}
|
}
|
||||||
function textToBytes(text) {
|
function textToBytes(text) {
|
||||||
return new TextEncoder(encoding).encode(text);
|
return new TextEncoder().encode(text);
|
||||||
}
|
}
|
||||||
function bytesToBits(bytes) {
|
function bytesToBits(bytes) {
|
||||||
return bytes.reduce((bits, byte) => [
|
return bytes.reduce((bits, byte) => [
|
||||||
|
|||||||
Reference in New Issue
Block a user