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 +4 -0
- package/dist/utils/bigint.mjs +1 -1
- package/package.json +1 -1
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)
|
package/dist/utils/bigint.mjs
CHANGED
|
@@ -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();
|