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
|
@@ -701,12 +701,11 @@ function isIterable(ctx, value) {
|
|
|
701
701
|
return false;
|
|
702
702
|
}
|
|
703
703
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
break;
|
|
704
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
707
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
708
|
+
return false;
|
|
710
709
|
}
|
|
711
710
|
}
|
|
712
711
|
if (ctx.features & 1024 /* Symbol */) {
|
|
@@ -1372,34 +1371,41 @@ async function parseObject(ctx, current) {
|
|
|
1372
1371
|
return generatePromiseNode(ctx, id, current);
|
|
1373
1372
|
}
|
|
1374
1373
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1374
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
1375
|
+
return createURLNode(id, current);
|
|
1376
|
+
}
|
|
1377
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
1378
|
+
return createURLSearchParamsNode(id, current);
|
|
1379
|
+
}
|
|
1380
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
1381
|
+
return createBlobNode(ctx, id, current);
|
|
1382
|
+
}
|
|
1383
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
1384
|
+
return createFileNode(ctx, id, current);
|
|
1385
|
+
}
|
|
1386
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
1387
|
+
return generateHeadersNode(ctx, id, current);
|
|
1388
|
+
}
|
|
1389
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
1390
|
+
return generateFormDataNode(ctx, id, current);
|
|
1391
|
+
}
|
|
1392
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
1393
|
+
return generateRequestNode(ctx, id, current);
|
|
1394
|
+
}
|
|
1395
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
1396
|
+
return generateResponseNode(ctx, id, current);
|
|
1397
|
+
}
|
|
1398
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
1399
|
+
return generateEventNode(ctx, id, current);
|
|
1400
|
+
}
|
|
1401
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
1402
|
+
return generateCustomEventNode(ctx, id, current);
|
|
1403
|
+
}
|
|
1404
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
1405
|
+
return createDOMExceptionNode(id, current);
|
|
1400
1406
|
}
|
|
1401
1407
|
}
|
|
1402
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1408
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
1403
1409
|
return generateAggregateErrorNode(ctx, id, current);
|
|
1404
1410
|
}
|
|
1405
1411
|
if (current instanceof Error) {
|
|
@@ -2861,26 +2867,29 @@ function parseObject2(ctx, current) {
|
|
|
2861
2867
|
return generateSetNode2(ctx, id, current);
|
|
2862
2868
|
}
|
|
2863
2869
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2870
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
2871
|
+
return createURLNode(id, current);
|
|
2872
|
+
}
|
|
2873
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
2874
|
+
return createURLSearchParamsNode(id, current);
|
|
2875
|
+
}
|
|
2876
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
2877
|
+
return generateHeadersNode2(ctx, id, current);
|
|
2878
|
+
}
|
|
2879
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
2880
|
+
return generateFormDataNode2(ctx, id, current);
|
|
2881
|
+
}
|
|
2882
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
2883
|
+
return generateEventNode2(ctx, id, current);
|
|
2884
|
+
}
|
|
2885
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
2886
|
+
return generateCustomEventNode2(ctx, id, current);
|
|
2887
|
+
}
|
|
2888
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
2889
|
+
return createDOMExceptionNode(id, current);
|
|
2881
2890
|
}
|
|
2882
2891
|
}
|
|
2883
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2892
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
2884
2893
|
return generateAggregateErrorNode2(ctx, id, current);
|
|
2885
2894
|
}
|
|
2886
2895
|
if (current instanceof Error) {
|
|
@@ -3650,34 +3659,41 @@ async function parseObject3(ctx, current) {
|
|
|
3650
3659
|
return generatePromiseNode2(ctx, id, current);
|
|
3651
3660
|
}
|
|
3652
3661
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3662
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
3663
|
+
return createURLNode(id, current);
|
|
3664
|
+
}
|
|
3665
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
3666
|
+
return createURLSearchParamsNode(id, current);
|
|
3667
|
+
}
|
|
3668
|
+
if (typeof Blob !== "undefined" && currentClass === Blob) {
|
|
3669
|
+
return createBlobNode2(ctx, id, current);
|
|
3670
|
+
}
|
|
3671
|
+
if (typeof File !== "undefined" && currentClass === File) {
|
|
3672
|
+
return createFileNode2(ctx, id, current);
|
|
3673
|
+
}
|
|
3674
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
3675
|
+
return generateHeadersNode3(ctx, id, current);
|
|
3676
|
+
}
|
|
3677
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
3678
|
+
return generateFormDataNode3(ctx, id, current);
|
|
3679
|
+
}
|
|
3680
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
3681
|
+
return generateRequestNode2(ctx, id, current);
|
|
3682
|
+
}
|
|
3683
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
3684
|
+
return generateResponseNode2(ctx, id, current);
|
|
3685
|
+
}
|
|
3686
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
3687
|
+
return generateEventNode3(ctx, id, current);
|
|
3688
|
+
}
|
|
3689
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
3690
|
+
return generateCustomEventNode3(ctx, id, current);
|
|
3691
|
+
}
|
|
3692
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
3693
|
+
return createDOMExceptionNode(id, current);
|
|
3678
3694
|
}
|
|
3679
3695
|
}
|
|
3680
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3696
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
3681
3697
|
return generateAggregateErrorNode3(ctx, id, current);
|
|
3682
3698
|
}
|
|
3683
3699
|
if (current instanceof Error) {
|
|
@@ -4888,32 +4904,38 @@ function parseObject4(ctx, current) {
|
|
|
4888
4904
|
return generatePromiseNode3(ctx, id, current);
|
|
4889
4905
|
}
|
|
4890
4906
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4907
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
4908
|
+
return createURLNode(id, current);
|
|
4909
|
+
}
|
|
4910
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
4911
|
+
return createURLSearchParamsNode(id, current);
|
|
4912
|
+
}
|
|
4913
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
4914
|
+
return generateHeadersNode4(ctx, id, current);
|
|
4915
|
+
}
|
|
4916
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
4917
|
+
return generateFormDataNode4(ctx, id, current);
|
|
4918
|
+
}
|
|
4919
|
+
if (typeof ReadableStream !== "undefined" && currentClass === ReadableStream) {
|
|
4920
|
+
return generateReadableStreamNode(ctx, id, current);
|
|
4921
|
+
}
|
|
4922
|
+
if (typeof Request !== "undefined" && currentClass === Request) {
|
|
4923
|
+
return generateRequestNode3(ctx, id, current);
|
|
4924
|
+
}
|
|
4925
|
+
if (typeof Response !== "undefined" && currentClass === Response) {
|
|
4926
|
+
return generateResponseNode3(ctx, id, current);
|
|
4927
|
+
}
|
|
4928
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
4929
|
+
return generateEventNode4(ctx, id, current);
|
|
4930
|
+
}
|
|
4931
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
4932
|
+
return generateCustomEventNode4(ctx, id, current);
|
|
4933
|
+
}
|
|
4934
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
4935
|
+
return createDOMExceptionNode(id, current);
|
|
4914
4936
|
}
|
|
4915
4937
|
}
|
|
4916
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4938
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
4917
4939
|
return generateAggregateErrorNode4(ctx, id, current);
|
|
4918
4940
|
}
|
|
4919
4941
|
if (current instanceof Error) {
|
|
@@ -5361,26 +5383,29 @@ function parseObject5(ctx, current) {
|
|
|
5361
5383
|
return generateSetNode5(ctx, id, current);
|
|
5362
5384
|
}
|
|
5363
5385
|
if (ctx.features & 8192 /* WebAPI */) {
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5386
|
+
if (typeof URL !== "undefined" && currentClass === URL) {
|
|
5387
|
+
return createURLNode(id, current);
|
|
5388
|
+
}
|
|
5389
|
+
if (typeof URLSearchParams !== "undefined" && currentClass === URLSearchParams) {
|
|
5390
|
+
return createURLSearchParamsNode(id, current);
|
|
5391
|
+
}
|
|
5392
|
+
if (typeof Headers !== "undefined" && currentClass === Headers) {
|
|
5393
|
+
return generateHeadersNode5(ctx, id, current);
|
|
5394
|
+
}
|
|
5395
|
+
if (typeof FormData !== "undefined" && currentClass === FormData) {
|
|
5396
|
+
return generateFormDataNode5(ctx, id, current);
|
|
5397
|
+
}
|
|
5398
|
+
if (typeof Event !== "undefined" && currentClass === Event) {
|
|
5399
|
+
return generateEventNode5(ctx, id, current);
|
|
5400
|
+
}
|
|
5401
|
+
if (typeof CustomEvent !== "undefined" && currentClass === CustomEvent) {
|
|
5402
|
+
return generateCustomEventNode5(ctx, id, current);
|
|
5403
|
+
}
|
|
5404
|
+
if (typeof DOMException !== "undefined" && currentClass === DOMException) {
|
|
5405
|
+
return createDOMExceptionNode(id, current);
|
|
5381
5406
|
}
|
|
5382
5407
|
}
|
|
5383
|
-
if (ctx.features & 1 /* AggregateError */ && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5408
|
+
if (ctx.features & 1 /* AggregateError */ && typeof AggregateError !== "undefined" && (currentClass === AggregateError || current instanceof AggregateError)) {
|
|
5384
5409
|
return generateAggregateErrorNode5(ctx, id, current);
|
|
5385
5410
|
}
|
|
5386
5411
|
if (current instanceof Error) {
|