seroval 0.6.0 → 0.7.0
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 +15 -3
- package/dist/cjs/development/index.cjs +550 -180
- package/dist/cjs/development/index.cjs.map +4 -4
- package/dist/cjs/production/index.cjs +3 -3
- package/dist/esm/development/index.mjs +550 -180
- package/dist/esm/development/index.mjs.map +4 -4
- package/dist/esm/production/index.mjs +3 -3
- package/dist/types/compat.d.ts +1 -1
- package/dist/types/context.d.ts +11 -5
- package/dist/types/string.d.ts +3 -0
- package/dist/types/tree/primitives.d.ts +4 -1
- package/dist/types/tree/types.d.ts +52 -9
- package/dist/types/tree/web-api.d.ts +3 -1
- package/package.json +3 -2
- package/src/compat.ts +1 -1
- package/src/context.ts +14 -6
- package/src/{quote.ts → string.ts} +27 -30
- package/src/tree/async.ts +87 -8
- package/src/tree/deserialize.ts +176 -59
- package/src/tree/primitives.ts +84 -20
- package/src/tree/serialize.ts +211 -41
- package/src/tree/sync.ts +76 -7
- package/src/tree/types.ts +111 -10
- package/src/tree/web-api.ts +53 -3
- package/dist/types/quote.d.ts +0 -2
package/README.md
CHANGED
|
@@ -240,6 +240,8 @@ The following values are the only values accepted by `seroval`:
|
|
|
240
240
|
- `Map`
|
|
241
241
|
- `Set`
|
|
242
242
|
- `Object.create(null)`
|
|
243
|
+
- `ArrayBuffer`
|
|
244
|
+
- `DataView`
|
|
243
245
|
- `TypedArray`
|
|
244
246
|
- `Int8Array`
|
|
245
247
|
- `Int16Array`
|
|
@@ -260,11 +262,17 @@ The following values are the only values accepted by `seroval`:
|
|
|
260
262
|
- `SyntaxError`
|
|
261
263
|
- `TypeError`
|
|
262
264
|
- `URIError`
|
|
263
|
-
- `Promise` (with `serializeAsync`)
|
|
265
|
+
- `Promise` (with `serializeAsync` and `toJSONAsync`)
|
|
264
266
|
- [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)
|
|
265
267
|
- [Well-known symbols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#static_properties)
|
|
266
|
-
-
|
|
267
|
-
- [`
|
|
268
|
+
- Web API
|
|
269
|
+
- [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL)
|
|
270
|
+
- [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
|
|
271
|
+
- [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) (with `serializeAsync` and `toJSONAsync`)
|
|
272
|
+
- [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) (with `serializeAsync` and `toJSONAsync`)
|
|
273
|
+
- [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers)
|
|
274
|
+
- [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
|
|
275
|
+
- If `FormData` has a `Blob`/`File` entry, it can only be serialized with `serializeAsync` and `toJSONAsync`
|
|
268
276
|
- Cyclic references (both self and mutual)
|
|
269
277
|
- Isomorphic references (a reference that exist on both the serializer and deserializer side)
|
|
270
278
|
|
|
@@ -356,6 +364,10 @@ By default, all feature flags are enabled. The following are the feature flags a
|
|
|
356
364
|
- Throws and disables the following usage:
|
|
357
365
|
- [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL)
|
|
358
366
|
- [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
|
|
367
|
+
- [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
|
|
368
|
+
- [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File)
|
|
369
|
+
- [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers)
|
|
370
|
+
- [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
|
|
359
371
|
|
|
360
372
|
## Sponsors
|
|
361
373
|
|