@yuneta/gobj-js 7.26.6 → 7.26.8
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.
- package/dist/gobj-js.cjs.js +23 -2
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +81 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +23 -2
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +79 -71
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +23 -2
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +10 -2
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +23 -2
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +10 -2
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -1757,6 +1757,7 @@
|
|
|
1757
1757
|
function hr(e, t, n) {
|
|
1758
1758
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1759
1759
|
const r = e ? et(e) + ": " : "";
|
|
1760
|
+
if (!tr(n)) return hn(`${r}kw_delete(): path must be a string: ${String(n)}`), -1;
|
|
1760
1761
|
let [l, o] = function(e, t) {
|
|
1761
1762
|
let n = e.lastIndexOf(t);
|
|
1762
1763
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
@@ -1862,6 +1863,7 @@
|
|
|
1862
1863
|
}
|
|
1863
1864
|
function Sr(e, t, n, r) {
|
|
1864
1865
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1866
|
+
if (!tr(n)) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
1865
1867
|
let l = n.split("`"), o = l.length;
|
|
1866
1868
|
for (let s = 0; s < o; s++) {
|
|
1867
1869
|
let i = l[s];
|
|
@@ -1882,8 +1884,12 @@
|
|
|
1882
1884
|
}
|
|
1883
1885
|
function wr(e, t, n, r, l) {
|
|
1884
1886
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1885
|
-
let o =
|
|
1886
|
-
|
|
1887
|
+
let o = mr(e, t, n, !1);
|
|
1888
|
+
if (void 0 === o) {
|
|
1889
|
+
if (!tr(n)) return -1;
|
|
1890
|
+
if (o = {}, Sr(e, t, n, o) < 0) return -1;
|
|
1891
|
+
}
|
|
1892
|
+
return Zn(o) ? (br(o, r, l), 0) : (hn(`subdict is not an object: '${n}'`), -1);
|
|
1887
1893
|
}
|
|
1888
1894
|
function Nr(e, t, r) {
|
|
1889
1895
|
let l = "", o = !1;
|
|
@@ -3166,6 +3172,7 @@
|
|
|
3166
3172
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3167
3173
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3168
3174
|
if (ir(r.id)) return hn("jdb_delete: record without id: " + r), Tn(r), null;
|
|
3175
|
+
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3169
3176
|
let o, s = n.split("`"), i = l;
|
|
3170
3177
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3171
3178
|
if (0 === s.length && i) if (er(i)) {
|
|
@@ -3198,6 +3205,7 @@
|
|
|
3198
3205
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3199
3206
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3200
3207
|
if (ir(r.id)) return hn("jdb_update: record without id: " + r), Tn(r), null;
|
|
3208
|
+
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3201
3209
|
let o, s = n.split("`"), i = l;
|
|
3202
3210
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, [], 1)), i = Yr(i, null, o, !1);
|
|
3203
3211
|
if (0 === s.length && i) if (er(i)) i.push(r);
|