@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.
@@ -1494,7 +1494,7 @@
1494
1494
  let u;
1495
1495
  if (Fn(o)) u = o;
1496
1496
  else if (a && Pn(o)) u = 0 !== o;
1497
- else if (a && Un(o)) u = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o) || 0);
1497
+ else if (a && Un(o)) u = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
1498
1498
  else {
1499
1499
  if (!a || null !== o) return a ? (dn(`${e ? et(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), hn(t), !1) : (dn(`${e ? et(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), hn(t), Boolean(r));
1500
1500
  u = !1;
@@ -1534,7 +1534,14 @@
1534
1534
  e && !Mn(e) && dn("GObj bad instanceof");
1535
1535
  let o = qn(e, t, n, !1);
1536
1536
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
1537
- return void 0 === o ? i ? (rr(e, t, n, Un(r) ? r : null), r) : (s && (dn(`path not found: '${n}'`), hn(t)), r) : Un(o) ? (_ && zn(e, t, n), o) : (s && (dn(`${et(e)}: path value MUST BE a string: ${n}`), mn(t)), r);
1537
+ return void 0 === o ? i ? (rr(e, t, n, Un(r) ? r : null), r) : (s && !function(e, t) {
1538
+ let n = Un(t) ? t.split("`") : [], r = e;
1539
+ for (let e = 0; e < n.length - 1; e++) {
1540
+ if (!Cn(r) && !Ln(r)) return !1;
1541
+ r = r[n[e]];
1542
+ }
1543
+ return !(!Cn(r) && !Ln(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
1544
+ }(t, n) && (dn(`path not found: '${n}'`), hn(t)), r) : Un(o) ? (_ && zn(e, t, n), o) : (null !== o && (dn(`${e ? et(e) + ": " : ""}path MUST BE a json str: '${n}'`), hn(t)), r);
1538
1545
  }
1539
1546
  function er(e, t, n, r, l) {
1540
1547
  e && !Mn(e) && dn("GObj bad instanceof");
@@ -1553,7 +1560,7 @@
1553
1560
  e && !Mn(e) && dn("GObj bad instanceof");
1554
1561
  let o = qn(e, t, n, !1);
1555
1562
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
1556
- return void 0 === o ? i && Cn(r) && t ? (rr(e, t, n, r), r) : (s && (dn(`path not found: '${n}'`), hn(t)), r) : Cn(o) ? (_ && zn(e, t, n), o) : (s && (dn(`${et(e)}: path value MUST BE a dict: ${n}`), mn(t)), r);
1563
+ return void 0 === o ? i && Cn(r) && t ? (rr(e, t, n, r), r) : (s && (dn(`path not found: '${n}'`), hn(t)), r) : Cn(o) ? (_ && zn(e, t, n), o) : (s && (dn(`${e ? et(e) + ": " : ""}path MUST BE a json dict: '${n}'`), hn(t)), r);
1557
1564
  }
1558
1565
  function nr(e, t, n, r, l) {
1559
1566
  e && !Mn(e) && dn("GObj bad instanceof");
@@ -2924,7 +2931,7 @@
2924
2931
  e && !Mn(e) && dn("GObj bad instanceof");
2925
2932
  let o = qn(e, t, n, !1);
2926
2933
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
2927
- return void 0 === o ? i && Ln(r) && t ? (rr(e, t, n, r), r) : (s && (dn(`path not found: '${n}'`), hn(t)), r) : Ln(o) ? (_ && zn(e, t, n), o) : (s && (dn(`${et(e)}: path value MUST BE an array: ${n}`), mn(t)), r);
2934
+ return void 0 === o ? i && Ln(r) && t ? (rr(e, t, n, r), r) : (s && (dn(`path not found: '${n}'`), hn(t)), r) : Ln(o) ? (_ && zn(e, t, n), o) : (s && (dn(`${e ? et(e) + ": " : ""}path MUST BE a json list: '${n}'`), hn(t)), r);
2928
2935
  }, e.kw_get_local_storage_value = ar, e.kw_get_pointer = er, e.kw_get_real = function(e, t, n, r, l) {
2929
2936
  e && !Mn(e) && dn("GObj bad instanceof");
2930
2937
  let o = qn(e, t, n, !1);