asn1-ts 11.0.5 → 11.0.6

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 CHANGED
@@ -12,6 +12,10 @@ This library is published on both
12
12
  `npm install asn1-ts` or `npx jsr add @wildboar/asn1`. As of version 9.0.0 and
13
13
  above, this library is ESM only: no more CommonJS.
14
14
 
15
+ This library should work on NodeJS, Bun, and Deno, and it should compile with
16
+ any reasonably new TypeScript version. If it does not work for you in these
17
+ cases, please let me know!
18
+
15
19
  **Table of Contents**
16
20
 
17
21
  - [Library Usage](#library-usage)
@@ -3,7 +3,7 @@ import { Buffer } from "node:buffer";
3
3
  export function bufferToInteger(input) {
4
4
  const buf = (input instanceof Buffer)
5
5
  ? input
6
- : Buffer.from(input.buffer);
6
+ : Buffer.from(input.buffer, input.byteOffset, input.byteLength);
7
7
  switch (buf.length) {
8
8
  case (0): return 0;
9
9
  case (1): return buf.readInt8();
package/package.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "test": "node --test"
49
49
  },
50
50
  "types": "./dist/index.d.mts",
51
- "version": "11.0.5",
51
+ "version": "11.0.6",
52
52
  "exports": {
53
53
  ".": {
54
54
  "import": "./dist/index.mjs",