@yuneta/gobj-js 7.25.4 → 7.25.5

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.
@@ -1491,7 +1491,7 @@ function zn(e, t, n, r, o) {
1491
1491
  let u;
1492
1492
  if (Un(s)) u = s;
1493
1493
  else if (a && Ln(s)) u = 0 !== s;
1494
- else if (a && Cn(s)) u = "true" === s.toLowerCase() || "false" !== s.toLowerCase() && 0 !== (parseInt(s) || 0);
1494
+ else if (a && Cn(s)) u = "true" === s.toLowerCase() || "false" !== s.toLowerCase() && 0 !== (parseInt(s, 10) || 0);
1495
1495
  else {
1496
1496
  if (!a || null !== s) return a ? (gn(`${e ? Ze(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), mn(t), !1) : (gn(`${e ? Ze(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), mn(t), Boolean(r));
1497
1497
  u = !1;
@@ -1531,7 +1531,14 @@ function Xn(e, t, n, r, o) {
1531
1531
  e && !Gn(e) && gn("GObj bad instanceof");
1532
1532
  let s = Hn(e, t, n, !1);
1533
1533
  const l = o && o & qt.KW_REQUIRED, i = o && o & qt.KW_CREATE, _ = o && o & qt.KW_EXTRACT;
1534
- return void 0 === s ? i ? (nr(e, t, n, Cn(r) ? r : null), r) : (l && (gn(`path not found: '${n}'`), mn(t)), r) : Cn(s) ? (_ && qn(e, t, n), s) : (l && (gn(`${Ze(e)}: path value MUST BE a string: ${n}`), bn(t)), r);
1534
+ return void 0 === s ? i ? (nr(e, t, n, Cn(r) ? r : null), r) : (l && !function(e, t) {
1535
+ let n = Cn(t) ? t.split("`") : [], r = e;
1536
+ for (let e = 0; e < n.length - 1; e++) {
1537
+ if (!kn(r) && !In(r)) return !1;
1538
+ r = r[n[e]];
1539
+ }
1540
+ return !(!kn(r) && !In(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
1541
+ }(t, n) && (gn(`path not found: '${n}'`), mn(t)), r) : Cn(s) ? (_ && qn(e, t, n), s) : (null !== s && (gn(`${e ? Ze(e) + ": " : ""}path MUST BE a json str: '${n}'`), mn(t)), r);
1535
1542
  }
1536
1543
  function Zn(e, t, n, r, o) {
1537
1544
  e && !Gn(e) && gn("GObj bad instanceof");
@@ -1550,7 +1557,7 @@ function er(e, t, n, r, o) {
1550
1557
  e && !Gn(e) && gn("GObj bad instanceof");
1551
1558
  let s = Hn(e, t, n, !1);
1552
1559
  const l = o && o & qt.KW_REQUIRED, i = o && o & qt.KW_CREATE, _ = o && o & qt.KW_EXTRACT;
1553
- return void 0 === s ? i && kn(r) && t ? (nr(e, t, n, r), r) : (l && (gn(`path not found: '${n}'`), mn(t)), r) : kn(s) ? (_ && qn(e, t, n), s) : (l && (gn(`${Ze(e)}: path value MUST BE a dict: ${n}`), bn(t)), r);
1560
+ return void 0 === s ? i && kn(r) && t ? (nr(e, t, n, r), r) : (l && (gn(`path not found: '${n}'`), mn(t)), r) : kn(s) ? (_ && qn(e, t, n), s) : (l && (gn(`${e ? Ze(e) + ": " : ""}path MUST BE a json dict: '${n}'`), mn(t)), r);
1554
1561
  }
1555
1562
  function tr(e, t, n, r, o) {
1556
1563
  e && !Gn(e) && gn("GObj bad instanceof");
@@ -2921,7 +2928,7 @@ exports.GObj = S, exports.SDATA = v, exports.SDATAAUTHZ = (e, t, n, r, o, s) =>
2921
2928
  e && !Gn(e) && gn("GObj bad instanceof");
2922
2929
  let s = Hn(e, t, n, !1);
2923
2930
  const l = o && o & qt.KW_REQUIRED, i = o && o & qt.KW_CREATE, _ = o && o & qt.KW_EXTRACT;
2924
- return void 0 === s ? i && In(r) && t ? (nr(e, t, n, r), r) : (l && (gn(`path not found: '${n}'`), mn(t)), r) : In(s) ? (_ && qn(e, t, n), s) : (l && (gn(`${Ze(e)}: path value MUST BE an array: ${n}`), bn(t)), r);
2931
+ return void 0 === s ? i && In(r) && t ? (nr(e, t, n, r), r) : (l && (gn(`path not found: '${n}'`), mn(t)), r) : In(s) ? (_ && qn(e, t, n), s) : (l && (gn(`${e ? Ze(e) + ": " : ""}path MUST BE a json list: '${n}'`), mn(t)), r);
2925
2932
  }, exports.kw_get_local_storage_value = _r, exports.kw_get_pointer = Zn, exports.kw_get_real = function(e, t, n, r, o) {
2926
2933
  e && !Gn(e) && gn("GObj bad instanceof");
2927
2934
  let s = Hn(e, t, n, !1);