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
package/src/core/tree/async.ts
CHANGED
|
@@ -669,35 +669,43 @@ async function parseObject(
|
|
|
669
669
|
}
|
|
670
670
|
// Web APIs
|
|
671
671
|
if (ctx.features & Feature.WebAPI) {
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
672
|
+
if (typeof URL !== 'undefined' && currentClass === URL) {
|
|
673
|
+
return createURLNode(id, current as unknown as URL);
|
|
674
|
+
}
|
|
675
|
+
if (typeof URLSearchParams !== 'undefined' && currentClass === URLSearchParams) {
|
|
676
|
+
return createURLSearchParamsNode(id, current as unknown as URLSearchParams);
|
|
677
|
+
}
|
|
678
|
+
if (typeof Blob !== 'undefined' && currentClass === Blob) {
|
|
679
|
+
return createBlobNode(ctx, id, current as unknown as Blob);
|
|
680
|
+
}
|
|
681
|
+
if (typeof File !== 'undefined' && currentClass === File) {
|
|
682
|
+
return createFileNode(ctx, id, current as unknown as File);
|
|
683
|
+
}
|
|
684
|
+
if (typeof Headers !== 'undefined' && currentClass === Headers) {
|
|
685
|
+
return generateHeadersNode(ctx, id, current as unknown as Headers);
|
|
686
|
+
}
|
|
687
|
+
if (typeof FormData !== 'undefined' && currentClass === FormData) {
|
|
688
|
+
return generateFormDataNode(ctx, id, current as unknown as FormData);
|
|
689
|
+
}
|
|
690
|
+
if (typeof Request !== 'undefined' && currentClass === Request) {
|
|
691
|
+
return generateRequestNode(ctx, id, current as unknown as Request);
|
|
692
|
+
}
|
|
693
|
+
if (typeof Response !== 'undefined' && currentClass === Response) {
|
|
694
|
+
return generateResponseNode(ctx, id, current as unknown as Response);
|
|
695
|
+
}
|
|
696
|
+
if (typeof Event !== 'undefined' && currentClass === Event) {
|
|
697
|
+
return generateEventNode(ctx, id, current as unknown as Event);
|
|
698
|
+
}
|
|
699
|
+
if (typeof CustomEvent !== 'undefined' && currentClass === CustomEvent) {
|
|
700
|
+
return generateCustomEventNode(ctx, id, current as unknown as CustomEvent);
|
|
701
|
+
}
|
|
702
|
+
if (typeof DOMException !== 'undefined' && currentClass === DOMException) {
|
|
703
|
+
return createDOMExceptionNode(id, current as unknown as DOMException);
|
|
697
704
|
}
|
|
698
705
|
}
|
|
699
706
|
if (
|
|
700
707
|
(ctx.features & Feature.AggregateError)
|
|
708
|
+
&& typeof AggregateError !== 'undefined'
|
|
701
709
|
&& (currentClass === AggregateError || current instanceof AggregateError)
|
|
702
710
|
) {
|
|
703
711
|
return generateAggregateErrorNode(ctx, id, current as unknown as AggregateError);
|
package/src/core/tree/sync.ts
CHANGED
|
@@ -555,31 +555,32 @@ function parseObject(
|
|
|
555
555
|
}
|
|
556
556
|
// Web APIs
|
|
557
557
|
if (ctx.features & Feature.WebAPI) {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
558
|
+
if (typeof URL !== 'undefined' && currentClass === URL) {
|
|
559
|
+
return createURLNode(id, current as unknown as URL);
|
|
560
|
+
}
|
|
561
|
+
if (typeof URLSearchParams !== 'undefined' && currentClass === URLSearchParams) {
|
|
562
|
+
return createURLSearchParamsNode(id, current as unknown as URLSearchParams);
|
|
563
|
+
}
|
|
564
|
+
if (typeof Headers !== 'undefined' && currentClass === Headers) {
|
|
565
|
+
return generateHeadersNode(ctx, id, current as unknown as Headers);
|
|
566
|
+
}
|
|
567
|
+
if (typeof FormData !== 'undefined' && currentClass === FormData) {
|
|
568
|
+
return generateFormDataNode(ctx, id, current as unknown as FormData);
|
|
569
|
+
}
|
|
570
|
+
if (typeof Event !== 'undefined' && currentClass === Event) {
|
|
571
|
+
return generateEventNode(ctx, id, current as unknown as Event);
|
|
572
|
+
}
|
|
573
|
+
if (typeof CustomEvent !== 'undefined' && currentClass === CustomEvent) {
|
|
574
|
+
return generateCustomEventNode(ctx, id, current as unknown as CustomEvent);
|
|
575
|
+
}
|
|
576
|
+
if (typeof DOMException !== 'undefined' && currentClass === DOMException) {
|
|
577
|
+
return createDOMExceptionNode(id, current as unknown as DOMException);
|
|
575
578
|
}
|
|
576
579
|
}
|
|
577
580
|
if (
|
|
578
581
|
(ctx.features & Feature.AggregateError)
|
|
579
|
-
&&
|
|
580
|
-
|
|
581
|
-
|| current instanceof AggregateError
|
|
582
|
-
)
|
|
582
|
+
&& typeof AggregateError !== 'undefined'
|
|
583
|
+
&& (currentClass === AggregateError || current instanceof AggregateError)
|
|
583
584
|
) {
|
|
584
585
|
return generateAggregateErrorNode(ctx, id, current as unknown as AggregateError);
|
|
585
586
|
}
|