x-runtime-lib 0.8.175 → 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.
Files changed (2) hide show
  1. package/dist/index.js +2 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -365,22 +365,12 @@ 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
- if (o) {
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
370
  i && typeof o == "object" && (o = JSON.stringify(o, null, 2)), await t.setElementProperty(n, e, o);
376
371
  }, ts = async (t, n, e) => {
377
372
  const o = ze(t, n);
378
- if (e) {
379
- if (typeof o != "string")
380
- throw new Error("unexpected value type");
381
- return JSON.parse(o);
382
- } else
383
- return o;
373
+ return e && typeof o == "string" ? JSON.parse(o) : o;
384
374
  }, ns = async (t, n, e, o) => {
385
375
  o && typeof e == "object" && (e = JSON.stringify(e, null, 2)), xn(t, n, e);
386
376
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.8.175",
4
+ "version": "0.8.176",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",