@sdxc/structured-fields 2026.10.24 → 2026.11.10
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 +6 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@ Results are [`@sdxc/result`](https://www.npmjs.com/package/@sdxc/result) values,
|
|
|
25
25
|
import { setField, stringify } from "@sdxc/structured-fields";
|
|
26
26
|
|
|
27
27
|
let headers = new Headers();
|
|
28
|
-
setField(headers, "RateLimit", {
|
|
29
|
-
// RateLimit:
|
|
28
|
+
setField(headers, "RateLimit", [{ value: "default", params: { r: 0, t: 7 } }], "list");
|
|
29
|
+
// RateLimit: "default";r=0;t=7
|
|
30
30
|
|
|
31
31
|
stringify({ value: 10, params: { w: 60 } }, "item"); // success: "10;w=60"
|
|
32
32
|
```
|
|
@@ -259,11 +259,11 @@ and write it unconditionally.
|
|
|
259
259
|
```typescript
|
|
260
260
|
import { setField } from "@sdxc/structured-fields";
|
|
261
261
|
|
|
262
|
-
let
|
|
263
|
-
if (
|
|
264
|
-
if (
|
|
262
|
+
let priority: Record<string, number | boolean> = {};
|
|
263
|
+
if (urgency !== null) priority.u = urgency;
|
|
264
|
+
if (incremental) priority.i = true;
|
|
265
265
|
|
|
266
|
-
setField(headers, "
|
|
266
|
+
setField(headers, "Priority", priority, "dictionary");
|
|
267
267
|
```
|
|
268
268
|
|
|
269
269
|
## Pattern: Branch On Why A Field Failed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/structured-fields",
|
|
3
|
-
"version": "2026.10
|
|
3
|
+
"version": "2026.11.10",
|
|
4
4
|
"description": "Parse and serialize RFC 9651 structured HTTP field values",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"@standard-schema/spec": "^1.1.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"remix": "3.
|
|
16
|
+
"remix": "3.2.0"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "6191b60a13885b1d826884d574c4a393f9b8eeee",
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|