@yuneta/gobj-js 7.26.5 → 7.26.6

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.
@@ -1756,17 +1756,14 @@
1756
1756
  }
1757
1757
  function hr(e, t, n) {
1758
1758
  e && !sr(e) && hn("GObj bad instanceof");
1759
- let [r, l] = function(e, t) {
1759
+ const r = e ? et(e) + ": " : "";
1760
+ let [l, o] = function(e, t) {
1760
1761
  let n = e.lastIndexOf(t);
1761
1762
  return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
1762
- }(n, "`");
1763
- if (ir(l)) Kn(t, n);
1764
- else {
1765
- let o = mr(e, t, r, !0);
1766
- if (er(o)) return hn(`${e ? et(e) + ": " : ""}kw_delete(): cannot delete an item of a list: '${n}'`), -1;
1767
- Kn(o, l);
1768
- }
1769
- return 0;
1763
+ }(n, "`"), s = t;
1764
+ if (ir(o)) o = n;
1765
+ else if (s = mr(e, t, l, !0), void 0 === s) return -1;
1766
+ return er(s) ? (hn(`${r}kw_delete(): cannot delete an item of a list: '${n}'`), -1) : Zn(s) && Object.prototype.hasOwnProperty.call(s, o) ? (delete s[o], 0) : (hn(`${r}kw_delete(): path not found: '${n}'`), -1);
1770
1767
  }
1771
1768
  function yr(e, t, n, r, l) {
1772
1769
  e && !sr(e) && hn("GObj bad instanceof");