bireader 1.0.41 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +2 -2
- package/package.json +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -678,7 +678,7 @@ function wbit(_this, value, bits, unsigned, endian) {
|
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
680
|
if (bits <= 0 || bits > 32) {
|
|
681
|
-
throw new Error('Bit length must be between 1 and 32.');
|
|
681
|
+
throw new Error('Bit length must be between 1 and 32. Got ' + bits);
|
|
682
682
|
}
|
|
683
683
|
if (unsigned == true) {
|
|
684
684
|
if (value < 0 || value > Math.pow(2, bits)) {
|
|
@@ -738,7 +738,7 @@ function rbit(_this, bits, unsigned, endian) {
|
|
|
738
738
|
return 0;
|
|
739
739
|
}
|
|
740
740
|
if (bits <= 0 || bits > 32) {
|
|
741
|
-
throw new Error('Bit length must be between 1 and 32.');
|
|
741
|
+
throw new Error('Bit length must be between 1 and 32. Got ' + bits);
|
|
742
742
|
}
|
|
743
743
|
const size_needed = ((((bits - 1) + _this.bitoffset) / 8) + _this.offset);
|
|
744
744
|
if (bits <= 0 || size_needed > _this.size) {
|