@thi.ng/msgpack 1.0.36 → 1.0.38
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 +1 -1
- package/package.json +5 -5
- package/serialize.js +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 212 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/msgpack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.38",
|
|
4
4
|
"description": "Small & fast msgpack serialization & deserialization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/checks": "^3.
|
|
43
|
-
"@thi.ng/errors": "^2.
|
|
44
|
-
"@thi.ng/strings": "^3.9.
|
|
42
|
+
"@thi.ng/checks": "^3.8.1",
|
|
43
|
+
"@thi.ng/errors": "^2.6.0",
|
|
44
|
+
"@thi.ng/strings": "^3.9.32"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"esbuild": "^0.27.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"status": "alpha",
|
|
87
87
|
"year": 2023
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "e7a21b9d2a188fa04d4c893d8531c40fbc0f4c06\n"
|
|
90
90
|
}
|
package/serialize.js
CHANGED
|
@@ -141,13 +141,13 @@ const serialize = (src, opts = {}) => {
|
|
|
141
141
|
break;
|
|
142
142
|
case "object":
|
|
143
143
|
n = 0;
|
|
144
|
-
for (
|
|
144
|
+
for (const k in x) {
|
|
145
145
|
if (x[k] !== void 0) n++;
|
|
146
146
|
}
|
|
147
147
|
if (n < 16) add8(128 | n);
|
|
148
148
|
else if (n < 65536) add16id(222, n);
|
|
149
149
|
else add32id(223, n);
|
|
150
|
-
for (
|
|
150
|
+
for (const k in x) {
|
|
151
151
|
const v = x[k];
|
|
152
152
|
if (v !== void 0) {
|
|
153
153
|
encode(k);
|