x-runtime-lib 0.8.174 → 0.8.176
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/index.js +4 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,34 +365,14 @@ function _t(t, n, e) {
|
|
|
365
365
|
}
|
|
366
366
|
const Qo = async (t, n, e, o) => {
|
|
367
367
|
const i = await t.getElementProperty(n, e);
|
|
368
|
-
|
|
369
|
-
if (typeof i != "string")
|
|
370
|
-
throw new Error("unexpected value type");
|
|
371
|
-
return JSON.parse(i);
|
|
372
|
-
} else
|
|
373
|
-
return i;
|
|
368
|
+
return o && typeof i == "string" ? JSON.parse(i) : i;
|
|
374
369
|
}, es = async (t, n, e, o, i) => {
|
|
375
|
-
|
|
376
|
-
if (typeof o != "object")
|
|
377
|
-
throw new Error("unexpected value type");
|
|
378
|
-
o = JSON.stringify(o, null, 2);
|
|
379
|
-
}
|
|
380
|
-
await t.setElementProperty(n, e, o);
|
|
370
|
+
i && typeof o == "object" && (o = JSON.stringify(o, null, 2)), await t.setElementProperty(n, e, o);
|
|
381
371
|
}, ts = async (t, n, e) => {
|
|
382
372
|
const o = ze(t, n);
|
|
383
|
-
|
|
384
|
-
if (typeof o != "string")
|
|
385
|
-
throw new Error("unexpected value type");
|
|
386
|
-
return JSON.parse(o);
|
|
387
|
-
} else
|
|
388
|
-
return o;
|
|
373
|
+
return e && typeof o == "string" ? JSON.parse(o) : o;
|
|
389
374
|
}, ns = async (t, n, e, o) => {
|
|
390
|
-
|
|
391
|
-
if (typeof e != "object")
|
|
392
|
-
throw new Error("unexpected value type");
|
|
393
|
-
e = JSON.stringify(e, null, 2);
|
|
394
|
-
}
|
|
395
|
-
xn(t, n, e);
|
|
375
|
+
o && typeof e == "object" && (e = JSON.stringify(e, null, 2)), xn(t, n, e);
|
|
396
376
|
};
|
|
397
377
|
function a(t, n, e) {
|
|
398
378
|
const o = oe(), i = ne();
|