bireader 1.0.41 → 1.0.42

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/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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bireader",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Read and write data in binary",
5
5
  "module": "lib/esm/index.mjs",
6
6
  "main": "lib/cjs/index.js",