msgpackr 1.8.2 → 1.8.4
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 +2 -2
- package/dist/index-no-eval.cjs +1 -1
- package/dist/index-no-eval.cjs.map +1 -1
- package/dist/index-no-eval.min.js +1 -1
- package/dist/index-no-eval.min.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/node.cjs +3 -2
- package/dist/node.cjs.map +1 -1
- package/dist/test.js +30 -2
- package/dist/test.js.map +1 -1
- package/dist/unpack-no-eval.cjs +2 -1
- package/dist/unpack-no-eval.cjs.map +1 -1
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/pack.js +1 -1
- package/package.json +2 -2
- package/unpack.js +2 -1
package/README.md
CHANGED
|
@@ -53,8 +53,8 @@ receivingStream.on('data', (data) => {
|
|
|
53
53
|
```
|
|
54
54
|
The `PackrStream` and `UnpackrStream` instances will have also the record structure extension enabled by default (see below).
|
|
55
55
|
|
|
56
|
-
## Deno Usage
|
|
57
|
-
Msgpackr modules are standard ESM modules and can be loaded directly from the [deno.land registry for msgpackr](https://deno.land/x/msgpackr) for use in Deno
|
|
56
|
+
## Deno and Bun Usage
|
|
57
|
+
Msgpackr modules are standard ESM modules and can be loaded directly from the [deno.land registry for msgpackr](https://deno.land/x/msgpackr) for use in Deno or using the NPM module loader with `import { unpack } from 'npm:msgpackr'`. The standard pack/encode and unpack/decode functionality is available on Deno, like other platforms. msgpackr can be used like any other package on Bun.
|
|
58
58
|
|
|
59
59
|
## Browser Usage
|
|
60
60
|
Msgpackr works as standalone JavaScript as well, and runs on modern browsers. It includes a bundled script, at `dist/index.js` for ease of direct loading:
|
package/dist/index-no-eval.cjs
CHANGED
|
@@ -1079,7 +1079,7 @@
|
|
|
1079
1079
|
let safeEnd;
|
|
1080
1080
|
let bundledStrings = null;
|
|
1081
1081
|
let writeStructSlots;
|
|
1082
|
-
const MAX_BUNDLE_SIZE =
|
|
1082
|
+
const MAX_BUNDLE_SIZE = 0x5500; // maximum characters such that the encoded bytes fits in 16 bits.
|
|
1083
1083
|
const hasNonLatin = /[\u0080-\uFFFF]/;
|
|
1084
1084
|
const RECORD_SYMBOL = Symbol('record-id');
|
|
1085
1085
|
class Packr extends Unpackr {
|