seroval 0.11.5 → 0.11.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/dist/cjs/development/index.cjs +143 -118
- package/dist/cjs/development/index.cjs.map +2 -2
- package/dist/cjs/production/index.cjs +2 -2
- package/dist/esm/development/index.mjs +143 -118
- package/dist/esm/development/index.mjs.map +2 -2
- package/dist/esm/production/index.mjs +2 -2
- package/package.json +2 -2
- package/src/core/cross/async.ts +33 -25
- package/src/core/cross/stream.ts +32 -27
- package/src/core/cross/sync.ts +22 -21
- package/src/core/shared.ts +5 -6
- package/src/core/tree/async.ts +33 -25
- package/src/core/tree/sync.ts +22 -21
|
@@ -740,12 +740,11 @@ function isIterable(ctx, value) {
|
|
|
740
740
|
return false;
|
|
741
741
|
}
|
|
742
742
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
break;
|
|
743
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
744
|
+
return false;
|
|
745
|
+
}
|
|
746
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
747
|
+
return false;
|
|
749
748
|
}
|
|
750
749
|
}
|
|
751
750
|
if (ctx.features & 1024 /* Symbol */) {
|
|
@@ -1411,34 +1410,41 @@ async function parseObject(ctx, current) {
|
|
|
1411
1410
|
return generatePromiseNode(ctx, id, current);
|
|
1412
1411
|
}
|
|
1413
1412
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1413
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
1414
|
+
return createURLNode(id, current);
|
|
1415
|
+
}
|
|
1416
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
1417
|
+
return createURLSearchParamsNode(id, current);
|
|
1418
|
+
}
|
|
1419
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
1420
|
+
return createBlobNode(ctx, id, current);
|
|
1421
|
+
}
|
|
1422
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
1423
|
+
return createFileNode(ctx, id, current);
|
|
1424
|
+
}
|
|
1425
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
1426
|
+
return generateHeadersNode(ctx, id, current);
|
|
1427
|
+
}
|
|
1428
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
1429
|
+
return generateFormDataNode(ctx, id, current);
|
|
1430
|
+
}
|
|
1431
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
1432
|
+
return generateRequestNode(ctx, id, current);
|
|
1433
|
+
}
|
|
1434
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
1435
|
+
return generateResponseNode(ctx, id, current);
|
|
1436
|
+
}
|
|
1437
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
1438
|
+
return generateEventNode(ctx, id, current);
|
|
1439
|
+
}
|
|
1440
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
1441
|
+
return generateCustomEventNode(ctx, id, current);
|
|
1442
|
+
}
|
|
1443
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
1444
|
+
return createDOMExceptionNode(id, current);
|
|
1439
1445
|
}
|
|
1440
1446
|
}
|
|
1441
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1447
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1442
1448
|
return generateAggregateErrorNode(ctx, id, current);
|
|
1443
1449
|
}
|
|
1444
1450
|
if (current instanceof Error) {
|
|
@@ -2900,26 +2906,29 @@ function parseObject2(ctx, current) {
|
|
|
2900
2906
|
return generateSetNode2(ctx, id, current);
|
|
2901
2907
|
}
|
|
2902
2908
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2909
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
2910
|
+
return createURLNode(id, current);
|
|
2911
|
+
}
|
|
2912
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
2913
|
+
return createURLSearchParamsNode(id, current);
|
|
2914
|
+
}
|
|
2915
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
2916
|
+
return generateHeadersNode2(ctx, id, current);
|
|
2917
|
+
}
|
|
2918
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
2919
|
+
return generateFormDataNode2(ctx, id, current);
|
|
2920
|
+
}
|
|
2921
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
2922
|
+
return generateEventNode2(ctx, id, current);
|
|
2923
|
+
}
|
|
2924
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
2925
|
+
return generateCustomEventNode2(ctx, id, current);
|
|
2926
|
+
}
|
|
2927
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
2928
|
+
return createDOMExceptionNode(id, current);
|
|
2920
2929
|
}
|
|
2921
2930
|
}
|
|
2922
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2931
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2923
2932
|
return generateAggregateErrorNode2(ctx, id, current);
|
|
2924
2933
|
}
|
|
2925
2934
|
if (current instanceof Error) {
|
|
@@ -3689,34 +3698,41 @@ async function parseObject3(ctx, current) {
|
|
|
3689
3698
|
return generatePromiseNode2(ctx, id, current);
|
|
3690
3699
|
}
|
|
3691
3700
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3701
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
3702
|
+
return createURLNode(id, current);
|
|
3703
|
+
}
|
|
3704
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
3705
|
+
return createURLSearchParamsNode(id, current);
|
|
3706
|
+
}
|
|
3707
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
3708
|
+
return createBlobNode2(ctx, id, current);
|
|
3709
|
+
}
|
|
3710
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
3711
|
+
return createFileNode2(ctx, id, current);
|
|
3712
|
+
}
|
|
3713
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
3714
|
+
return generateHeadersNode3(ctx, id, current);
|
|
3715
|
+
}
|
|
3716
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
3717
|
+
return generateFormDataNode3(ctx, id, current);
|
|
3718
|
+
}
|
|
3719
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
3720
|
+
return generateRequestNode2(ctx, id, current);
|
|
3721
|
+
}
|
|
3722
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
3723
|
+
return generateResponseNode2(ctx, id, current);
|
|
3724
|
+
}
|
|
3725
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
3726
|
+
return generateEventNode3(ctx, id, current);
|
|
3727
|
+
}
|
|
3728
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
3729
|
+
return generateCustomEventNode3(ctx, id, current);
|
|
3730
|
+
}
|
|
3731
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
3732
|
+
return createDOMExceptionNode(id, current);
|
|
3717
3733
|
}
|
|
3718
3734
|
}
|
|
3719
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3735
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3720
3736
|
return generateAggregateErrorNode3(ctx, id, current);
|
|
3721
3737
|
}
|
|
3722
3738
|
if (current instanceof Error) {
|
|
@@ -4927,32 +4943,38 @@ function parseObject4(ctx, current) {
|
|
|
4927
4943
|
return generatePromiseNode3(ctx, id, current);
|
|
4928
4944
|
}
|
|
4929
4945
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4946
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
4947
|
+
return createURLNode(id, current);
|
|
4948
|
+
}
|
|
4949
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
4950
|
+
return createURLSearchParamsNode(id, current);
|
|
4951
|
+
}
|
|
4952
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
4953
|
+
return generateHeadersNode4(ctx, id, current);
|
|
4954
|
+
}
|
|
4955
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
4956
|
+
return generateFormDataNode4(ctx, id, current);
|
|
4957
|
+
}
|
|
4958
|
+
if (typeof ReadableStream !== "undefined" && currentClass === ReadableStream) {
|
|
4959
|
+
return generateReadableStreamNode(ctx, id, current);
|
|
4960
|
+
}
|
|
4961
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
4962
|
+
return generateRequestNode3(ctx, id, current);
|
|
4963
|
+
}
|
|
4964
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
4965
|
+
return generateResponseNode3(ctx, id, current);
|
|
4966
|
+
}
|
|
4967
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
4968
|
+
return generateEventNode4(ctx, id, current);
|
|
4969
|
+
}
|
|
4970
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
4971
|
+
return generateCustomEventNode4(ctx, id, current);
|
|
4972
|
+
}
|
|
4973
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
4974
|
+
return createDOMExceptionNode(id, current);
|
|
4953
4975
|
}
|
|
4954
4976
|
}
|
|
4955
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4977
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4956
4978
|
return generateAggregateErrorNode4(ctx, id, current);
|
|
4957
4979
|
}
|
|
4958
4980
|
if (current instanceof Error) {
|
|
@@ -5400,26 +5422,29 @@ function parseObject5(ctx, current) {
|
|
|
5400
5422
|
return generateSetNode5(ctx, id, current);
|
|
5401
5423
|
}
|
|
5402
5424
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5425
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
5426
|
+
return createURLNode(id, current);
|
|
5427
|
+
}
|
|
5428
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
5429
|
+
return createURLSearchParamsNode(id, current);
|
|
5430
|
+
}
|
|
5431
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
5432
|
+
return generateHeadersNode5(ctx, id, current);
|
|
5433
|
+
}
|
|
5434
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
5435
|
+
return generateFormDataNode5(ctx, id, current);
|
|
5436
|
+
}
|
|
5437
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
5438
|
+
return generateEventNode5(ctx, id, current);
|
|
5439
|
+
}
|
|
5440
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
5441
|
+
return generateCustomEventNode5(ctx, id, current);
|
|
5442
|
+
}
|
|
5443
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
5444
|
+
return createDOMExceptionNode(id, current);
|
|
5420
5445
|
}
|
|
5421
5446
|
}
|
|
5422
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5447
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5423
5448
|
return generateAggregateErrorNode5(ctx, id, current);
|
|
5424
5449
|
}
|
|
5425
5450
|
if (current instanceof Error) {
|