@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.
@@ -1492,7 +1492,7 @@ var gobjJs = function(e) {
1492
1492
  let u;
1493
1493
  if (Fn(o)) u = o;
1494
1494
  else if (a && Pn(o)) u = 0 !== o;
1495
- else if (a && Un(o)) u = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o) || 0);
1495
+ else if (a && Un(o)) u = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
1496
1496
  else {
1497
1497
  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));
1498
1498
  u = !1;
@@ -1532,7 +1532,14 @@ var gobjJs = function(e) {
1532
1532
  e && !Mn(e) && dn("GObj bad instanceof");
1533
1533
  let o = qn(e, t, n, !1);
1534
1534
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
1535
- 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);
1535
+ return void 0 === o ? i ? (rr(e, t, n, Un(r) ? r : null), r) : (s && !function(e, t) {
1536
+ let n = Un(t) ? t.split("`") : [], r = e;
1537
+ for (let e = 0; e < n.length - 1; e++) {
1538
+ if (!Cn(r) && !Ln(r)) return !1;
1539
+ r = r[n[e]];
1540
+ }
1541
+ return !(!Cn(r) && !Ln(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
1542
+ }(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);
1536
1543
  }
1537
1544
  function er(e, t, n, r, l) {
1538
1545
  e && !Mn(e) && dn("GObj bad instanceof");
@@ -1551,7 +1558,7 @@ var gobjJs = function(e) {
1551
1558
  e && !Mn(e) && dn("GObj bad instanceof");
1552
1559
  let o = qn(e, t, n, !1);
1553
1560
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
1554
- 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);
1561
+ 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);
1555
1562
  }
1556
1563
  function nr(e, t, n, r, l) {
1557
1564
  e && !Mn(e) && dn("GObj bad instanceof");
@@ -2922,7 +2929,7 @@ var gobjJs = function(e) {
2922
2929
  e && !Mn(e) && dn("GObj bad instanceof");
2923
2930
  let o = qn(e, t, n, !1);
2924
2931
  const s = l && l & zt.KW_REQUIRED, i = l && l & zt.KW_CREATE, _ = l && l & zt.KW_EXTRACT;
2925
- 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);
2932
+ 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);
2926
2933
  }, e.kw_get_local_storage_value = ar, e.kw_get_pointer = er, e.kw_get_real = function(e, t, n, r, l) {
2927
2934
  e && !Mn(e) && dn("GObj bad instanceof");
2928
2935
  let o = qn(e, t, n, !1);