@har-analyzer/components 0.0.17 → 0.0.18
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.
|
@@ -3013,9 +3013,9 @@ function Gn({ data: l }) {
|
|
|
3013
3013
|
}
|
|
3014
3014
|
function Hn(l) {
|
|
3015
3015
|
try {
|
|
3016
|
-
return [JSON.parse(l)
|
|
3016
|
+
return [void 0, JSON.parse(l)];
|
|
3017
3017
|
} catch (n) {
|
|
3018
|
-
return console.warn("Failed to parse JSON string:", l, "Error:", n), [void 0
|
|
3018
|
+
return console.warn("Failed to parse JSON string:", l, "Error:", n), [n, void 0];
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
3021
|
function ai({
|
|
@@ -3036,8 +3036,8 @@ function ai({
|
|
|
3036
3036
|
let u = Pt(s), h = l;
|
|
3037
3037
|
if (n === "base64" && (h = qt.Buffer.from(l, n).toString("utf8")), c === "JSON") {
|
|
3038
3038
|
const [y, a] = Hn(h);
|
|
3039
|
-
if (!
|
|
3040
|
-
return /* @__PURE__ */ g(Gn, { data:
|
|
3039
|
+
if (!y)
|
|
3040
|
+
return /* @__PURE__ */ g(Gn, { data: a });
|
|
3041
3041
|
u = void 0;
|
|
3042
3042
|
}
|
|
3043
3043
|
return /* @__PURE__ */ g(
|
package/dist/utils/json.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function safeDeserialize<T>(jsonString: string): readonly [
|
|
1
|
+
export declare function safeDeserialize<T>(jsonString: string): readonly [undefined, T] | readonly [unknown, undefined];
|